Interop: Java setter not seen by ceylon code when it overrides a setter in a java interface
See original GitHub issue[@jpragey] This one bites when I tried to use jface preferences from ceylon (hence the names). Java code:
public interface MyInterface {
}
public interface MyIPreferencePage {
public void setContainer(MyInterface preferencePageContainer);
}
public class MyPreferencePage implements MyIPreferencePage {
private MyInterface intf = null;
public MyInterface getContainer() {
return intf;
}
public void setContainer(MyInterface container) {
this.intf = container;
}
}
called by ceylon code:
shared class MyPrefPage() extends MyPreferencePage() {}
Leads to
[ceylon-compile] /home/jpragey/workspace4/MyApp/build/src/org/myapp/run.ceylon:3: error: formal member setContainer of MyIPreferencePage not implemented in class hierarchy
[ceylon-compile] shared class MyPrefPage() extends MyPreferencePage() {
[ceylon-compile] ^
[ceylon-compile] 1 error
[Migrated from ceylon/ceylon-compiler#1368]
Issue Analytics
- State:
- Created 10 years ago
- Comments:32 (3 by maintainers)
Top Results From Across the Web
Interoperation with Java - Eclipse Ceylon
In this chapter, we're going to learn about how to interoperate with native code running on the Java Virtual Machine, and focus on...
Read more >Why In This Case , Overriding Setter Method Is Not Working
The reason is that return types may be covariant. You can always return a more specific type (i.e. a subtype) when overriding a...
Read more >Using Java from Ceylon - GitHub
If there is a Java Bean setter that has no corresponding getter (such as in the older parts of the JDK such as...
Read more >Kotlin properties do not override Java-style getters and setters
Java methods can already override Kotlin properties, so it seems inconsistent that the reverse is not allowed. This is only needed for interoperability...
Read more >EMF » [XCORE] How to customize/override attribute getter/setter
no special body is generated for the setter valueA. Code: ... If you're hoping to not write any Java code for your more...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It’s now 2017 and I’m also having this problem 😃
You mean when I don’t refine it?