Skip to content
Snippets Groups Projects
Unverified Commit 939cb91a authored by thorstenhater's avatar thorstenhater Committed by GitHub
Browse files

Fix ambiguous Region/Locset expressions (#1629)

- Add a set of test cases to check the behaviour
- Remove the function `(nil)` from the the DSL
- Remove `nil` and `()` as literals
- Add functions `(region-nil)` and `(locset-nil)`

Fixes an issue where `join` (and likely `intersect`) would not work due to the fact that
`nil` values could not be coerced to `region` or `locset`. This occurred while loading 
a NML files.

While investigating it was found that certain calls, eg `(join () ())` are ambiguous and cannot
be resolved without changes in no proportion to the gain. The cause here is that
we can resolve `()` as region or a locset and at the same time `join` maps a list of
locsets or regions to a locset or region, consequently `(join () ())` can be both.

For future reference, in `label_parse.cpp::eval` we look for the first match in the `eval_map` 
of a function name that can be successfully evaluated. However, this might not be the best match
(and the ordering depends on the internal...
parent 7722d2ee
No related branches found
No related tags found
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment