< prev index next >

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

Print this page

        

*** 1,17 **** /* * @test /nodynamiccopyright/ * @summary Value types may not declare fields of its own type either directly or indirectly. ! * @modules java.base/jvm.internal.value ! * @compile/fail/ref=CheckCyclicMembership.out -XDrawDiagnostics -Werror -Xlint:values CheckCyclicMembership.java */ ! @jvm.internal.value.ValueCapableClass final class CheckCyclicMembership { class InnerRef { CheckCyclicMembership ccm; } ! @jvm.internal.value.ValueCapableClass final class InnerValue { final CheckCyclicMembership ccm = new CheckCyclicMembership(); // Error. } final CheckCyclicMembership ccm = new CheckCyclicMembership(); // Error. final int i = 10; final String s = "blah"; --- 1,17 ---- /* * @test /nodynamiccopyright/ * @summary Value types may not declare fields of its own type either directly or indirectly. ! * @modules jdk.incubator.mvt ! * @compile/fail/ref=CheckCyclicMembership.out --should-stop:ifError=PARSE -XDrawDiagnostics -Werror -Xlint:values CheckCyclicMembership.java */ ! @jdk.incubator.mvt.ValueCapableClass final class CheckCyclicMembership { class InnerRef { CheckCyclicMembership ccm; } ! @jdk.incubator.mvt.ValueCapableClass final class InnerValue { final CheckCyclicMembership ccm = new CheckCyclicMembership(); // Error. } final CheckCyclicMembership ccm = new CheckCyclicMembership(); // Error. final int i = 10; final String s = "blah";
< prev index next >