8006566: Remove transient lambda-related guards from JavacParser
authormcimadamore
Mon, 21 Jan 2013 20:14:39 +0000
changeset 15375 d2529dc91d77
parent 15374 fb8f6acf09cc
child 15376 32b49791817d
8006566: Remove transient lambda-related guards from JavacParser Summary: Remove transitional internal flag for allowing intersection types in cast Reviewed-by: jjg
langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
langtools/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java
langtools/test/tools/javac/cast/intersection/IntersectionTypeParserTest.java
langtools/test/tools/javac/cast/intersection/model/Model01.java
langtools/test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java
langtools/test/tools/javac/lambda/Intersection01.java
langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Mon Jan 21 20:13:56 2013 +0000
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Mon Jan 21 20:14:39 2013 +0000
@@ -124,9 +124,7 @@
         this.allowLambda = source.allowLambda();
         this.allowMethodReferences = source.allowMethodReferences();
         this.allowDefaultMethods = source.allowDefaultMethods();
-        this.allowIntersectionTypesInCast =
-                source.allowIntersectionTypesInCast() &&
-                fac.options.isSet("allowIntersectionTypes");
+        this.allowIntersectionTypesInCast = source.allowIntersectionTypesInCast();
         this.keepDocComments = keepDocComments;
         docComments = newDocCommentTable(keepDocComments, fac);
         this.keepLineMap = keepLineMap;
--- a/langtools/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java	Mon Jan 21 20:13:56 2013 +0000
+++ b/langtools/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java	Mon Jan 21 20:14:39 2013 +0000
@@ -287,8 +287,7 @@
         final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
 
         JavacTask ct = (JavacTask)tool.getTask(null, fm.get(), diagChecker,
-                Arrays.asList("-XDallowIntersectionTypes"),
-                null, Arrays.asList(source));
+                null, null, Arrays.asList(source));
         try {
             ct.analyze();
         } catch (Throwable ex) {
--- a/langtools/test/tools/javac/cast/intersection/IntersectionTypeParserTest.java	Mon Jan 21 20:13:56 2013 +0000
+++ b/langtools/test/tools/javac/cast/intersection/IntersectionTypeParserTest.java	Mon Jan 21 20:14:39 2013 +0000
@@ -170,7 +170,7 @@
     void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception {
         checkCount++;
         JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker,
-                Arrays.asList("-XDallowIntersectionTypes"), null, Arrays.asList(source));
+                null, null, Arrays.asList(source));
         ct.parse();
         if (diagChecker.errorFound) {
             throw new Error("Unexpected parser error for source:\n" +
--- a/langtools/test/tools/javac/cast/intersection/model/Model01.java	Mon Jan 21 20:13:56 2013 +0000
+++ b/langtools/test/tools/javac/cast/intersection/model/Model01.java	Mon Jan 21 20:14:39 2013 +0000
@@ -27,7 +27,7 @@
  * @summary Add support for intersection types in cast expression
  * @library /tools/javac/lib
  * @build JavacTestingAbstractProcessor ModelChecker
- * @compile -XDallowIntersectionTypes -processor ModelChecker Model01.java
+ * @compile -processor ModelChecker Model01.java
  */
 
 import javax.lang.model.element.ElementKind;
--- a/langtools/test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java	Mon Jan 21 20:13:56 2013 +0000
+++ b/langtools/test/tools/javac/diags/examples/SecondaryBoundMustBeMarkerIntf.java	Mon Jan 21 20:14:39 2013 +0000
@@ -23,7 +23,6 @@
 
 // key: compiler.err.prob.found.req
 // key: compiler.misc.secondary.bound.must.be.marker.intf
-// options: -XDallowIntersectionTypes
 
 class SecondaryBoundMustBeMarkerInterface {
     Runnable r = (Runnable & Comparable<?>)()->{};
--- a/langtools/test/tools/javac/lambda/Intersection01.java	Mon Jan 21 20:13:56 2013 +0000
+++ b/langtools/test/tools/javac/lambda/Intersection01.java	Mon Jan 21 20:14:39 2013 +0000
@@ -25,7 +25,7 @@
  * @test
  * @bug 8002099
  * @summary Add support for intersection types in cast expression
- * @compile/fail/ref=Intersection01.out -XDallowIntersectionTypes -XDrawDiagnostics Intersection01.java
+ * @compile/fail/ref=Intersection01.out -XDrawDiagnostics Intersection01.java
  */
 class Intersection01 {
 
--- a/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java	Mon Jan 21 20:13:56 2013 +0000
+++ b/langtools/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java	Mon Jan 21 20:14:39 2013 +0000
@@ -248,7 +248,7 @@
 
     void run(JavaCompiler tool, StandardJavaFileManager fm) throws Exception {
         JavacTask ct = (JavacTask)tool.getTask(null, fm, diagChecker,
-                Arrays.asList("-XDallowIntersectionTypes"), null, Arrays.asList(source));
+                null, null, Arrays.asList(source));
         try {
             ct.analyze();
         } catch (Throwable ex) {