jdfergason/swift-toml

hasTable() and hasKey() return false for inline tables

emlai opened this issue · 3 comments

emlai commented

This seems to be a bug (tested in v0.3.0). I think both of them should return true.

Here's a commit that adds a test case which catches these: 7cfa946. Feel free to merge.

I'm not sure how to fix this though.

emlai commented

Also, it seems that the table() getter doesn't find inline tables.

I think I got this fixed:

  • hasKey now reports true for tables and key/value pairs if they exist in the Toml document
  • hasTable now correctly reports true for inline tables
  • table now works
  • updated testSimple to include test cases for hasTable and hasKey on the inline table

Available in e0f541f and created v0.3.1 release

emlai commented

👍