-
Bug
-
Resolution: Fixed
-
P4
-
11, 17, 20
-
b08
See https://github.com/openjdk/jdk/blob/master/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java#L1410-L1413:
if (tMap.containsKey(ti)) {
throw new AssertionError("Malformed intersection");
}
tMap.put(ti.tsym, ti);
Map<Symbol,Type> may not contain keys of type 'Type'
Obvious fix (changing to containsKey(ti.tsym) ) causes the AssertionError to be thrown in the following tests:
tools/javac/lambda/intersection/IntersectionTargetTypeTest.java
tools/javac/cast/intersection/IntersectionTypeCastTest.java
Snippet from the IntersectionTargetTypeTest log:
java.lang.AssertionError: Error thrown when compiling the following code:
..
interface C { void m(); }
..
class Test {
void m() { }
void test() {
Object o = (C & C)()->{};
} }
The code in question was introduced inJDK-8143852
if (tMap.containsKey(ti)) {
throw new AssertionError("Malformed intersection");
}
tMap.put(ti.tsym, ti);
Map<Symbol,Type> may not contain keys of type 'Type'
Obvious fix (changing to containsKey(ti.tsym) ) causes the AssertionError to be thrown in the following tests:
tools/javac/lambda/intersection/IntersectionTargetTypeTest.java
tools/javac/cast/intersection/IntersectionTypeCastTest.java
Snippet from the IntersectionTargetTypeTest log:
java.lang.AssertionError: Error thrown when compiling the following code:
..
interface C { void m(); }
..
class Test {
void m() { }
void test() {
Object o = (C & C)()->{};
} }
The code in question was introduced in
- relates to
-
JDK-8143852 Implement type variable renaming for functional interface most specific test
- Closed