JDK8 b121 Win32: javac crash due to Code::arraycode AssertionError: arraycode OBJECT
Vicente-Arturo Romero-Zaldivar
vicente.romero at oracle.com
Sun Feb 9 14:14:19 PST 2014
On 09/02/14 22:05, Remi Forax wrote:
> On 02/09/2014 10:20 PM, Vicente-Arturo Romero-Zaldivar wrote:
>> Hi Samuel,
>>
>> We missed this one, thanks for the report. I have created bug
>> https://bugs.openjdk.java.net/browse/JDK-8034048 to track it.
>>
>> Vicente
> it can be reduced to:
> public interface Null {
> public static <I> Object functional(I... input) {
> return null;
> }
>
> public static <T> void main(String[] arguments) {
> java.util.function.Consumer<T> functional = Null::functional;
> }
> }
>
> cheers,
> Rémi
Thanks,
I will add it to the bug entry.
Vicente
>
>> On 01/01/14 12:34, Samuel Dennis Borlongan wrote:
>>> Greetings to all (and a blessed new year as well)!
>>>
>>> The following code crashes javac in JDK8 b121 Win32 (re:
>>> http://mail.openjdk.java.net/pipermail/lambda-dev/2013-May/009874.html):
>>>
>>> public interface Null {
>>> @SafeVarargs
>>> public static <INPUT, OUTPUT> OUTPUT functional(INPUT... input) {
>>> return null;
>>> }
>>>
>>> // Uncomment to successfully compile in JDK8 b121 Win32
>>> // public static <INPUT, OUTPUT> OUTPUT functional(INPUT input) {
>>> // return null;
>>> // }
>>>
>>> public static <OBJECT> void main(String... arguments) {
>>> java.util.function.Supplier<java.util.function.Consumer<OBJECT>>
>>> functional =
>>> () -> Null::functional
>>> ;
>>> }
>>> }
>>>
>>> /*
>>> 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.AssertionError: arraycode OBJECT
>>> at com.sun.tools.javac.jvm.Code.arraycode(Code.java:302)
>>> at com.sun.tools.javac.jvm.Gen.makeNewArray(Gen.java:2028)
>>> at com.sun.tools.javac.jvm.Gen.visitNewArray(Gen.java:2001)
>>> at com.sun.tools.javac.tree.JCTree$JCNewArray.accept(JCTree.java:1556)
>>> at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:947)
>>> at com.sun.tools.javac.jvm.Gen.genArgs(Gen.java:966)
>>> at com.sun.tools.javac.jvm.Gen.visitApply(Gen.java:1905)
>>> at
>>> com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1459)
>>> at com.sun.tools.javac.jvm.Gen.genExpr(Gen.java:947)
>>> at com.sun.tools.javac.jvm.Gen.visitExec(Gen.java:1842)
>>> at
>>> com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1290)
>>> at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:737)
>>> at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:772)
>>> at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:758)
>>> at com.sun.tools.javac.jvm.Gen.genStats(Gen.java:809)
>>> at com.sun.tools.javac.jvm.Gen.visitBlock(Gen.java:1158)
>>> at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:903)
>>> at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:737)
>>> at com.sun.tools.javac.jvm.Gen.genStat(Gen.java:772)
>>> at com.sun.tools.javac.jvm.Gen.genMethod(Gen.java:1031)
>>> at com.sun.tools.javac.jvm.Gen.visitMethodDef(Gen.java:994)
>>> at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:772)
>>> at com.sun.tools.javac.jvm.Gen.genDef(Gen.java:737)
>>> at com.sun.tools.javac.jvm.Gen.genClass(Gen.java:2526)
>>> at com.sun.tools.javac.main.JavaCompiler.genCode(JavaCompiler.java:748)
>>> at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1570)
>>> at com.sun.tools.javac.main.JavaCompiler.generate(JavaCompiler.java:1534)
>>> at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:904)
>>> at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:863)
>>> at com.sun.tools.javac.main.Main.compile(Main.java:523)
>>> at com.sun.tools.javac.main.Main.compile(Main.java:381)
>>> at com.sun.tools.javac.main.Main.compile(Main.java:370)
>>> at com.sun.tools.javac.main.Main.compile(Main.java:361)
>>> at com.sun.tools.javac.Main.compile(Main.java:56)
>>> at com.sun.tools.javac.Main.main(Main.java:42)
>>> */
>>>
>>> Thank you!
>>>
>>> Samuel Dennis R. Borlongan
>>>
>
More information about the lambda-dev
mailing list