< prev index next >
langtools/test/tools/javac/valhalla/minimalvalues/CheckIdentityHash01.java
Print this page
*** 1,14 ****
/*
* @test /nodynamiccopyright/
* @summary Value types do not support identityHashCode
! * @modules java.base/jvm.internal.value
! * @compile/fail/ref=CheckIdentityHash01.out -XDrawDiagnostics -Werror -Xlint:values CheckIdentityHash01.java
*/
import static java.lang.System.*;
! @jvm.internal.value.ValueCapableClass
final class CheckIdentityHash01 {
void test(CheckIdentityHash01 v) {
identityHashCode(v); // <- error
identityHashCode(this); // <- error
--- 1,14 ----
/*
* @test /nodynamiccopyright/
* @summary Value types do not support identityHashCode
! * @modules jdk.incubator.mvt
! * @compile/fail/ref=CheckIdentityHash01.out --should-stop:ifError=PARSE -XDrawDiagnostics -Werror -Xlint:values CheckIdentityHash01.java
*/
import static java.lang.System.*;
! @jdk.incubator.mvt.ValueCapableClass
final class CheckIdentityHash01 {
void test(CheckIdentityHash01 v) {
identityHashCode(v); // <- error
identityHashCode(this); // <- error
< prev index next >