Open bjansen opened 7 years ago
Can reproduce with the following setup:
import java.io.Closeable;
public class Parameterized
```java
import java.util.Map;
public abstract class Foo {
public void bar(Map<String, Parameterized<?>> hello) {
}
}
class Ceylon() extends Foo() {
shared actual void bar(Map<String, Parameterized<out Object>> parameterized)
=> super.bar(parameterized);
}
Result:
source/foo/run.ceylon:10: error: type of parameter 'parameterized' of 'bar' declared by 'Ceylon' is different to type of corresponding parameter 'arg0' of refined member 'bar' of 'Foo': 'Map<String,Parameterized<out Object>>' is not exactly 'Parameterized<out Closeable>?'
shared actual void bar(Map<String, Parameterized<out Object>> parameterized)
^
source/foo/run.ceylon:11: error: argument must be assignable to parameter 'arg0' of 'bar' in 'Foo': 'Map<String,Parameterized<out Object>>' is not assignable to 'Parameterized<out Closeable>?'
=> super.bar(parameterized);
^
2 errors
See attached sample project test.zip.
While trying to override this Java method in Ceylon, I get a
name clash
error whereas I think my signature is correct:Java method:
Ceylon override:
Replacing
<out Object>
with<out JpsElement>
(as implied by the error message) does not fix the problem. I'm not sure how to reproduce it in a simple case though.