Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/TOMLDecoder/Parsing/Parser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 5 additions & 0 deletions Tests/TOMLDecoderTests/TOMLDecoderTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading