hg: tiered-attrib/dev/langtools: create a position descriptor that can be used to describe the arguments of a method reference
vicente.romero at oracle.com
vicente.romero at oracle.com
Fri Jun 26 00:59:42 UTC 2015
Changeset: ed3bdc825622
Author: vromero
Date: 2015-06-25 17:15 -0700
URL: http://hg.openjdk.java.net/tiered-attrib/dev/langtools/rev/ed3bdc825622
create a position descriptor that can be used to describe the arguments of a method reference
the inference context has a cache of the types captured during the creation of the bound set.
So far the key of that cache has been the AST, which is an argument of the method to be instantiated.
It's always save to say that given the same AST, the same captured type will be obtained. There are cases
for which an AST associated to an argument is not present, for example for method references. But still
the inference context gets constraints from the formal types of the method the method reference is
referring to. If those types are captured more than once then there can possibly be a mismatch.
For those cases a PositionDescriptor class has been defined, and for formal types, the descriptor will
contain a reference to the tree, a method reference in most cases plus the argument order.
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Infer.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/InferenceContext.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Resolve.java
+ test/tools/javac/tieredAttr/lambda/TAMethodReferenceTest02.java
More information about the tiered-attrib-dev
mailing list