backend error for functional parameter with parameter of same name
Closed this issue · 4 comments
zamfofex commented
The following code breaks the Java backend:
class Broken(shared void bar(String bar)) {}
The error is the following:
source\test\test.ceylon:-1: error: Ceylon backend error: cannot find symbol
symbol: method $call$(Bar)
location: variable bar of type Bar
gavinking commented
I have edited the issue title and description, since the bug has nothing to do with use-site variance or meta literals. The problem arises when a functional parameter of a class has a parameter with the same name (bar
in the example above).
gavinking commented
We need to qualify the reference to the field bar
with this.
in the public method bar()
.
gavinking commented
Fixed.
zamfofex commented
I have edited the issue title and description, since the bug has nothing to do with use-site variance or meta literals.
It's probably a different error than the one I originally found, then. Because:
- in my actual program, the parameter's parameter has a different name from the parameter itself
- exchanging the meta literal for a declaration meta literal fixed the problem
- I've noticed now that the error message in my program is actually different than the one I reported
I suppose I should investigate a little further and try to report the error I originally found.