< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/AttrContext.java

Print this page
@@ -47,17 +47,13 @@
  
      /** The number of enclosing `static' modifiers.
       */
      int staticLevel = 0;
  
-     /** Is this an environment for a this(...) or super(...) call?
+     /** Are we in the 'prologue' part of a constructor, prior to an explicit this()/super()?
       */
-     boolean isSelfCall = false;
- 
-     /** are we analyzing the arguments for a constructor invocation?
-      */
-     boolean constructorArgs = false;
+     boolean ctorPrologue = false;
  
      /** Are we evaluating the selector of a `super' or type name?
       */
      boolean selectSuper = false;
  

@@ -128,18 +124,19 @@
       *  but this may not be true during the window a method is looked up in enclosing
       *  contexts (JDK-8145466)
       */
      JCTree preferredTreeForDiagnostics;
  
+     boolean instanceInitializerBlock = false;
+ 
      /** Duplicate this context, replacing scope field and copying all others.
       */
      AttrContext dup(WriteableScope scope) {
          AttrContext info = new AttrContext();
          info.scope = scope;
          info.staticLevel = staticLevel;
-         info.isSelfCall = isSelfCall;
-         info.constructorArgs = constructorArgs;
+         info.ctorPrologue = ctorPrologue;
          info.selectSuper = selectSuper;
          info.pendingResolutionPhase = pendingResolutionPhase;
          info.lint = lint;
          info.enclVar = enclVar;
          info.returnResult = returnResult;

@@ -152,10 +149,11 @@
          info.isAnonymousDiamond = isAnonymousDiamond;
          info.isNewClass = isNewClass;
          info.preferredTreeForDiagnostics = preferredTreeForDiagnostics;
          info.visitingServiceImplementation = visitingServiceImplementation;
          info.allowProtectedAccess = allowProtectedAccess;
+         info.instanceInitializerBlock = instanceInitializerBlock;
          return info;
      }
  
      /** Duplicate this context, copying all fields.
       */
< prev index next >