Closed mvertes closed 2 years ago
Yes, I went for the shortest fix. The issue here is that type assertion can be sometime (not always) be resolved at compile time, or else during execution, only when concrete type is known, and that we use the same checking function. We should really have 2 implementations here, one for compile time, the other for execution, but it is another level of effort.
In type assertion at compile time, compare signatures between function types only.
Make
itype.numOut()
return the correct value for Go builtins (this was not strictly necessary due to above fix, but it is correct and improves maintainability).Fixes #1454.