test/tools/javac/valhalla/minimalvalues/CheckIdentityHash01.java

Print this page

        

*** 4,14 **** * @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.DeriveValueType final class CheckIdentityHash01 { void test(CheckIdentityHash01 v) { identityHashCode(v); // <- error identityHashCode(this); // <- error --- 4,14 ---- * @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