Open antoyo opened 5 years ago
This is not a bug.
It is actually a very important feature. A template function can always be re-implemented. And lexical scoping is used to determine which implementation of the template is supposed to be used.
Ok, having an error reporting in ATS instead of in C (gcc) would be great to explain what is going on. It seemed strange to me that function without generic parameters have a different behavior.
Hi. Here's the code with the error:
and:
I've tried to reproduce the issue with a small example, but I was unable to do so, so I've simplified my example to a minimum. Here's the error that is produced:
If I put the
implement or
before the call toor
, the code compiles fine:I believe this is a bug as this seems to work in other scenarios. Thanks to fix the issue.