diff --git a/Sources/TOMLDecoder/Parsing/Parser.swift b/Sources/TOMLDecoder/Parsing/Parser.swift index 3fb3586..95c5c15 100644 --- a/Sources/TOMLDecoder/Parsing/Parser.swift +++ b/Sources/TOMLDecoder/Parsing/Parser.swift @@ -774,7 +774,7 @@ struct Parser: ~Copyable { } switch token.kind { - case .string: + case .string, .bareKey: if arrays[arrayIndex].kind == nil { arrays[arrayIndex].kind = .value } else if arrays[arrayIndex].kind != .value { diff --git a/Tests/TOMLDecoderTests/TOMLDecoderTests.swift b/Tests/TOMLDecoderTests/TOMLDecoderTests.swift index 96f83ba..f72f620 100644 --- a/Tests/TOMLDecoderTests/TOMLDecoderTests.swift +++ b/Tests/TOMLDecoderTests/TOMLDecoderTests.swift @@ -348,6 +348,11 @@ struct TOMLDecoderTests { _ = try decoder.decode(LocalPlayer.self, from: toml) } + @Test(arguments: ["x = [[true]]", "x = [[inf]]"]) + func nestedBooleanAndSpecialFloatArraysParse(_ toml: String) throws { + _ = try TOMLTable(source: toml) + } + @Test func tomlIoExample() throws { let toml = """ # This is a TOML document