RFR: JDK-8296968: Update langtools tests to use @enablePreview [v2]

Jonathan Gibbons jjg at openjdk.org
Wed Nov 16 22:57:32 UTC 2022


On Tue, 15 Nov 2022 23:05:50 GMT, Joe Darcy <darcy at openjdk.org> wrote:

>> test/langtools/tools/javac/patterns/PatternErrorRecovery.java line 5:
>> 
>>> 3:  * @bug 8268320
>>> 4:  * @summary Verify user-friendly errors are reported for ill-formed pattern.
>>> 5:  * @compile/fail/ref=PatternErrorRecovery.out -XDrawDiagnostics -XDshould-stop.at=FLOW --enable-preview -source ${jdk.version} PatternErrorRecovery.java
>> 
>> why no `@enablePreview` for this test?
>
> The test has multiple @compile directives, one of which does not use --enable-preview. (I didn't check closely to see if enablePreview could be toggled on/off for different sets of directives.)

You can't toggle. Thanks for the note.

-------------

PR: https://git.openjdk.org/jdk/pull/11149


More information about the compiler-dev mailing list