Closed ta0kira closed 4 years ago
As it turns out, there was a related issue where the param filters of the parent scope were being used as guesses, which was causing a clash.
So, in 0.7.0.0
, there is a bug that should only occur if the parent scope has a param with the same name as the function being called, and the former has a non-defines
filter with that param on the left. (Using the example above, if Type1
had a filter #x requires Foo
, etc.)
Note that the parser
example uses a lot of inference, and nearly all of the params are #x
, with a few #y
. So, it in theory mostly works right now.
As it turns out, it looks like assignFunctionParams
might have a similar issue with param clashes.
Also see #73.
guessParamsFromArgs
includes filters from the function's params. This could cause issues if the scope where the function is called has a param of the same name.It shouldn't be much of an issue currently because
Map.union
is left-biased and the function params are included on the right.It might not even be possible currently for those filters to affect the outcome; I can't think of a situation where they'd even be looked up. (Needs a fix and some tests, either way.)