Skip to content

Instantly share code, notes, and snippets.

@lucaswerkmeister
Created January 17, 2014 12:27
Show Gist options
  • Save lucaswerkmeister/8472600 to your computer and use it in GitHub Desktop.
Save lucaswerkmeister/8472600 to your computer and use it in GitHub Desktop.
for – if
package tmp;
final class forIf_ {
private forIf_() {
}
static .ceylon.language.Iterable<? extends .java.lang.Object, ? extends .java.lang.Object> forIf(final .ceylon.language.Iterable<? extends .ceylon.language.String, ? extends .java.lang.Object> x) {
return new .com.redhat.ceylon.compiler.java.language.AbstractIterable<.ceylon.language.String, .java.lang.Object>(.com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor.union(.ceylon.language.Null.$TypeDescriptor$, .ceylon.language.String.$TypeDescriptor$), .ceylon.language.Null.$TypeDescriptor$){
public final .ceylon.language.Iterator<.ceylon.language.String> iterator() {
return new .com.redhat.ceylon.compiler.java.language.AbstractIterator<.ceylon.language.String>(.com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor.union(.ceylon.language.Null.$TypeDescriptor$, .ceylon.language.String.$TypeDescriptor$)){
{
$iterator$0 = x.iterator();
}
private final .ceylon.language.Iterator<? extends .ceylon.language.String> $iterator$0;
private .ceylon.language.String y;
private boolean y$exhausted$;
private final boolean y() {
final .java.lang.Object $ceylontmp$item$0 = $iterator$0.next();
y$exhausted$ = $ceylontmp$item$0 == .ceylon.language.finished_.get_();
if (y$exhausted$) {
return false;
} else {
y = (.ceylon.language.String)$ceylontmp$item$0;
return true;
}
}
private .java.lang.String y$2;
private final boolean $next$1() {
while (true) {
if (!this.y()) break;
.ceylon.language.String y$1 = null;
if ((y$1 = y) != null) {
y$2 = y$1.toString();
break;
}
}
return !y$exhausted$;
}
public final .java.lang.Object next() {
if (this.$next$1()) {
final .ceylon.language.String y = this.y;
final .java.lang.String y$2 = this.y$2;
return .ceylon.language.String.instance(y$2);
} else return .ceylon.language.finished_.get_();
}
};
}
};
}
}
@noanno
{Anything*} forIf({String?*} x) {
return { for (y in x) if (exists y) y };
}

An exception has occurred in the compiler (ceylonc 1.0.0 (No More Mr Nice Guy)). java.lang.AssertionError: Unknown symbol type tmp.package_ kind: 31 at com.sun.tools.javac.comp.Check.checkFlags(Check.java:934) at com.sun.tools.javac.comp.Enter.visitClassDef(Enter.java:402) at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:593) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:262) at com.redhat.ceylon.compiler.java.loader.CeylonEnter.classEnter(CeylonEnter.java:279) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:276) at com.sun.tools.javac.comp.Enter.visitTopLevel(Enter.java:336) at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:459) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:262) at com.redhat.ceylon.compiler.java.loader.CeylonEnter.classEnter(CeylonEnter.java:274) at com.sun.tools.javac.comp.Enter.classEnter(Enter.java:276) at com.sun.tools.javac.comp.Enter.complete(Enter.java:497) at com.sun.tools.javac.comp.Enter.main(Enter.java:482) at com.redhat.ceylon.compiler.java.loader.CeylonEnter.main(CeylonEnter.java:197) at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:930) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:824) at com.redhat.ceylon.compiler.java.tools.LanguageCompiler.compile(LanguageCompiler.java:223) at com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:638) at com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:553) at com.redhat.ceylon.compiler.java.launcher.Main.compile(Main.java:543) at com.redhat.ceylon.compiler.CeylonCompileTool.run(CeylonCompileTool.java:443) at com.redhat.ceylon.common.tools.CeylonTool.run(CeylonTool.java:343) at com.redhat.ceylon.common.tools.CeylonTool.execute(CeylonTool.java:283) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.redhat.ceylon.launcher.Launcher.run(Launcher.java:89) at com.redhat.ceylon.launcher.Launcher.main(Launcher.java:21) ceylon compile: Fatal error: The compiler exited abnormally (4) due to a bug in the compiler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment