Currently Types.SameTypeVisitor.visitClassType has the following code:
...
return t.tsym == s.tsym
&& visit(t.getEnclosingType(), s.getEnclosingType())
&& containsTypes(t.getTypeArguments(), s.getTypeArguments());
check if after the fix forJDK-8159970 type equality don't need to be expressed in terms of type containment. I realize that this code is the way it is partially because of the existence of two same type visitors: loose and strict and the use of the loose visitor by the containment visitor, via subtype visitor. So the first step should be to remove, if possible, all invocations of the loose visitor that can be fulfilled by the strict visitor. If this is possible, then the remaining use cases needing the loose visitor should be investigated and then probably it could make sense to move some / all of it's code to other visitors.
...
return t.tsym == s.tsym
&& visit(t.getEnclosingType(), s.getEnclosingType())
&& containsTypes(t.getTypeArguments(), s.getTypeArguments());
check if after the fix for
- duplicates
-
JDK-8196074 Remove uses of loose type equality tests
-
- Resolved
-
- relates to
-
JDK-8159970 javac, JLS8 18.2.4 is not completely implemented by the compiler
-
- Closed
-