You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This little bit of code illustrates a several issues:
In test.ceylon:
class Single<Element>(Element e) {
shared Element get() { return e; }
}
void test() {
value s = Single(69);
if (s.get()<100) {}
}
Java code generated for test.ceylon
@.com.redhat.ceylon.compiler.metadata.java.Ceylon
class Single<Element> {
private final Element e;
@.com.redhat.ceylon.compiler.metadata.java.TypeInfo("Element")
public final Element get() {
return e;
}
Single(@.com.redhat.ceylon.compiler.metadata.java.Name("e")
@.com.redhat.ceylon.compiler.metadata.java.TypeInfo("Element")
Element e) {
this.e = e;
}
}
@.com.redhat.ceylon.compiler.metadata.java.Ceylon
@.com.redhat.ceylon.compiler.metadata.java.Method
final class test {
private test() {
}
static void test() {
final .Single<ceylon.language.Natural> s = new <ceylon.language.Natural>.Single<ceylon.language.Natural>(.ceylon.language.Natural.instance(69L));
if (s.get().compare(.ceylon.language.Natural.instance(100L)).smaller().booleanValue() == true) {
}
}
}
The problems are:
"new <ceylon.language.Natural>.Single<ceylon.language.Natural>" has two type argument lists.
"smaller()" returns unboxed "boolean"
"== true" is just garbage.
The text was updated successfully, but these errors were encountered:
This little bit of code illustrates a several issues:
In test.ceylon:
Java code generated for test.ceylon
The problems are:
The text was updated successfully, but these errors were encountered: