< prev index next >

langtools/test/tools/javac/valhalla/minimalvalues/CheckEquals.java

Print this page

        

*** 1,12 **** /* * @test /nodynamiccopyright/ * @summary Value types do not support == or != ! * @modules java.base/jvm.internal.value ! * @compile/fail/ref=CheckEquals.out -XDrawDiagnostics -Werror -Xlint:values CheckEquals.java */ ! @jvm.internal.value.ValueCapableClass final class CheckEquals { boolean foo(CheckEquals a, CheckEquals b) { return (a == b) || (a != b); } } --- 1,12 ---- /* * @test /nodynamiccopyright/ * @summary Value types do not support == or != ! * @modules jdk.incubator.mvt ! * @compile/fail/ref=CheckEquals.out --should-stop:ifError=PARSE -XDrawDiagnostics -Werror -Xlint:values CheckEquals.java */ ! @jdk.incubator.mvt.ValueCapableClass final class CheckEquals { boolean foo(CheckEquals a, CheckEquals b) { return (a == b) || (a != b); } }
< prev index next >