SelectMany or other useful operators from Rx (Ix)

Dávid Karnok akarnokd at gmail.com
Wed Jan 9 11:12:24 PST 2013


Fair enough, thanks.

By the way, here is a compiler crash, probably with the same root cause as
the bad bytecodes above.

public class CompilerCrash1 {
    public static Runnable run() {
        return () -> {
            new Runnable() {

                @Override
                public void run() {
                    throw new UnsupportedOperationException("Not supported
yet.");
                }

            };
        };
    }
    public static void main(String[] args) {
        run();
    }
}

An exception has occurred in the compiler (1.8.0-ea). Please file a bug at
the Java Developer Connection (http://java.sun.com/webapps/bugreport)
 after checking the Bug Parade for duplicates. Include your program and the
following diagnostic in your report.  Thank you.
java.lang.NullPointerException
at com.sun.tools.javac.jvm.Code.emitop0(Code.java:537)
at com.sun.tools.javac.jvm.Items$SelfItem.load(Items.java:367)
at com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:911)
at com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1745)
at
com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1410)
at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:892)
at com.sun.tools.javac.jvm.Gen.visitReturn(Gen.java:1714)
at com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1328)
at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:682)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:717)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:703)
at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:754)
at com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:1089)
at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:852)
at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:682)
at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:717)
at com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:967)
at com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:940)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:736)
at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:682)
at com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2309)
at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:752)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1522)
at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1486)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:908)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:867)
at com.sun.tools.javac.main.Main.compile(Main.java:482)
at com.sun.tools.javac.main.Main.compile(Main.java:363)
at com.sun.tools.javac.main.Main.compile(Main.java:352)
at com.sun.tools.javac.main.Main.compile(Main.java:343)
at com.sun.tools.javac.Main.compile(Main.java:76)
at com.sun.tools.javac.Main.main(Main.java:61)


2013/1/9 Brian Goetz <brian.goetz at oracle.com>

> The short answer is: if one element maps to infinitely many elements, you
> lose, otherwise everything works as expected.
>
>

-- 
Best regards,
David Karnok


More information about the lambda-dev mailing list