compiler bug with overloaded Record constructor
Vicente Romero
vicente.romero at oracle.com
Tue Jul 16 18:04:58 UTC 2019
thanks Chris, I have fixed the bug you reported. The issue was that some
mandated members were not being `entered` after being automatically
added by the compiler. This implied that some fields were not
initialized and thus flow analysis was complaining later.
Thanks,
Vicente
Changeset: 4ab1f9f1fda2
Author: vromero
Date: 2019-07-16 14:01 -0400
URL:https://hg.openjdk.java.net/amber/amber/rev/4ab1f9f1fda2
do enter additional mandated members
On 7/16/19 5:49 AM, Chris Hegarty wrote:
> $ hg branch
> records-and-sealed
>
> $ hg log -b records-and-sealed -l 1
> changeset: 56938:400d527fd8a5
> branch: records-and-sealed
> parent: 56929:b2747f122ad9
> user: vromero
> date: Mon Jul 15 15:21:19 2019 -0400
> summary: fixing failing regression tests
>
> $ hg id
> 400d527fd8a5 (records-and-sealed)
>
> ---
>
> $ cat Rec.java
> record R(int i, int j) {
> public R(int i, int j, Object obj) { }
> }
>
> $ ./build/linux-x86_64-server-release/images/jdk/bin/javac Rec.java
> An exception has occurred in the compiler (13-internal). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program, the following diagnostic, and the parameters passed to the Java compiler in your report. Thank you.
> java.lang.AssertionError
> at jdk.compiler/com.sun.tools.javac.util.Assert.error(Assert.java:155)
> at jdk.compiler/com.sun.tools.javac.util.Assert.check(Assert.java:46)
> at jdk.compiler/com.sun.tools.javac.util.Bits.incl(Bits.java:186)
> at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.initParam(Flow.java:2041)
> at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitMethodDef(Flow.java:1983)
> at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:880)
> at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
> at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:406)
> at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1554)
> at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.visitClassDef(Flow.java:1925)
> at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:788)
> at jdk.compiler/com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
> at jdk.compiler/com.sun.tools.javac.comp.Flow$BaseAnalyzer.scan(Flow.java:406)
> at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.scan(Flow.java:1554)
> at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.analyzeTree(Flow.java:2669)
> at jdk.compiler/com.sun.tools.javac.comp.Flow$AssignAnalyzer.analyzeTree(Flow.java:2651)
> at jdk.compiler/com.sun.tools.javac.comp.Flow.analyzeTree(Flow.java:217)
> at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1406)
> at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1380)
> at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:972)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:318)
> at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
> at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:57)
> at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:43)
> printing javac parameters to: /home/chhegar/repos/amber/amber/javac.20190716_104106.args
>
>
> -Chris.
>
More information about the amber-dev
mailing list