changeset 56924:aafe1923b9cc patterns-stage-1

Fixing tests.
author jlahoda
date Thu, 11 Jul 2019 14:40:03 +0200
parents af2b0c9d2769
children f6a80788dc08 b212bd325a04
files src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java test/langtools/tools/javac/lib/DPrinter.java test/langtools/tools/javac/patterns/scope/ScopeTest.java
diffstat 3 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java	Thu Jun 20 22:04:43 2019 +0200
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Flags.java	Thu Jul 11 14:40:03 2019 +0200
@@ -451,7 +451,9 @@
         HAS_RESOURCE(Flags.HAS_RESOURCE),
         POTENTIALLY_AMBIGUOUS(Flags.POTENTIALLY_AMBIGUOUS),
         ANONCONSTR_BASED(Flags.ANONCONSTR_BASED),
-        NAME_FILLED(Flags.NAME_FILLED);
+        NAME_FILLED(Flags.NAME_FILLED),
+        MATCH_BINDING(Flags.MATCH_BINDING),
+        MATCH_BINDING_TO_OUTER(Flags.MATCH_BINDING_TO_OUTER);
 
         Flag(long flag) {
             this.value = flag;
--- a/test/langtools/tools/javac/lib/DPrinter.java	Thu Jun 20 22:04:43 2019 +0200
+++ b/test/langtools/tools/javac/lib/DPrinter.java	Thu Jul 11 14:40:03 2019 +0200
@@ -879,7 +879,7 @@
         @Override
         public void visitTypeTest(JCInstanceOf tree) {
             printTree("expr", tree.expr);
-            printTree("clazz", tree.clazz);
+            printTree("pattern", tree.pattern);
         }
 
         @Override
--- a/test/langtools/tools/javac/patterns/scope/ScopeTest.java	Thu Jun 20 22:04:43 2019 +0200
+++ b/test/langtools/tools/javac/patterns/scope/ScopeTest.java	Thu Jul 11 14:40:03 2019 +0200
@@ -110,8 +110,10 @@
     }
 
     private void assertFail(String expectedDiag, String block) {
+        String sourceVersion = Integer.toString(Runtime.version().feature());
+
         reset();
-        addCompileOptions("--enable-preview", "-source", "12");
+        addCompileOptions("--enable-preview", "-source", sourceVersion);
         program(block);
         try {
             compile();