code: AttrContext dup(WriteableScope scope) {
          AttrContext info = new AttrContext();
          info.scope = scope;
          info.staticLevel = staticLevel;
          info.isSelfCall = isSelfCall;
          info.selectSuper = selectSuper;
          info.pendingResolutionPhase = pendingResolutionPhase;
          info.lint = lint;
          info.enclVar = enclVar;
          info.returnResult = returnResult;
          info.defaultSuperCallSite = defaultSuperCallSite;
          info.isSerializable = isSerializable;
          info.isLambda = isLambda;
          info.isSpeculative = isSpeculative;
          info.isAnonymousDiamond = isAnonymousDiamond;
          info.isNewClass = isNewClass;
          info.preferredTreeForDiagnostics = preferredTreeForDiagnostics;
          info.visitingServiceImplementation = visitingServiceImplementation;
          return info;
      }
docs: Duplicate this context, replacing scope field and copying all others.