RFR: 8250840: some tests use --enable-preview unnecessarily
Jan Lahoda
jlahoda at openjdk.java.net
Tue Sep 8 16:25:18 UTC 2020
On Tue, 8 Sep 2020 16:08:20 GMT, Vicente Romero <vromero at openjdk.org> wrote:
>> 8250840: some tests use --enable-preview unnecessarily
>
> test/langtools/tools/javac/ConditionalExpressionResolvePending.java line 38:
>
>> 36: * @build combo.ComboTestHelper
>> 37: * @compile ConditionalExpressionResolvePending.java
>> 38: * @run main/othervm --enable-preview ConditionalExpressionResolvePending
>
> do you still need the @run main/othervm?
Yes, that's still needed. The test internally compiles some code with --enable-preview and then tries to load and run
the code in a separate ClassLoader in the same VM. So --enable-preview at runtime is required.
-------------
PR: https://git.openjdk.java.net/jdk/pull/41
More information about the compiler-dev
mailing list