anchor.diff:      var returnType = node.declaredElement!.type.returnType;
       InferenceContext.setType(node.body, returnType);
   
  -    super.visitConstructorDeclaration(node);
  +    var outerFunction = _enclosingFunction;
  +    try {
  +      _enclosingFunction = node.declaredElement;
  +      super.visitConstructorDeclaration(node);
  +    } finally {
  +      _enclosingFunction = outerFunction;
  +    }
   
       if (node.factoryKeyword != null) {
         var bodyContext = BodyInferenceContext.of(node.body);
  
positive.code:     //
      var outerType = enclosingClass;
      try {
        super.visitMixinDeclaration(node);
        node.accept(elementResolver);
        node.accept(typeAnalyzer);
  
negative.code:   @override
    void visitEnumDeclaration(EnumDeclaration node) {
      Scope outerScope = nameScope;
      try {
        ClassElement element = node.declaredElement!;
        node.metadata.accept(this);
  
        nameScope = ClassScope(nameScope, element);
        visitEnumMembersInScope(node);
      } finally {
        nameScope = outerScope;
      }
    }
  