hg: valhalla/valhalla/langtools: Add support for (some) Object method calls on 'any' tvars

maurizio.cimadamore at oracle.com maurizio.cimadamore at oracle.com
Tue Jan 13 16:23:09 UTC 2015


Changeset: ec4dbf00c278
Author:    mcimadamore
Date:      2015-01-13 16:22 +0000
URL:       http://hg.openjdk.java.net/valhalla/valhalla/langtools/rev/ec4dbf00c278

Add support for (some) Object method calls on 'any' tvars
* add type-checking support for the following Object methods when called from an 'any' typevar:
   -toString
   -hashCode
   -equals
* implement stricter semantics when calling 'equals' on an 'any' tvar: values to be compared should have same static type
* added tests

! src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Attr.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/Items.java
! src/jdk.compiler/share/classes/com/sun/tools/javac/resources/compiler.properties
- test/tools/javac/diags/examples/TypeVarCantBeDerefAny.java
! test/tools/javac/valhalla/typespec/AnyReference.java
! test/tools/javac/valhalla/typespec/AnyReference.out
! test/tools/javac/valhalla/typespec/Instanceof01.java
! test/tools/javac/valhalla/typespec/Instanceof01.out
+ test/tools/javac/valhalla/typespec/ObjectMethods.java
+ test/tools/javac/valhalla/typespec/ObjectMethods.out




More information about the valhalla-dev mailing list