anchor.diff:  
     @override
     visitDeclaredIdentifier(DeclaredIdentifier node) {
  -    _assertLegacyType(node.element?.type);
  +    _assertLegacyType(node.declaredElement?.type);
       super.visitDeclaredIdentifier(node);
     }
   
     @override
     visitEnumDeclaration(EnumDeclaration node) {
  -    _assertLegacyType(node.element?.type);
  +    _assertLegacyType(node.declaredElement?.type);
       super.visitEnumDeclaration(node);
     }
   
  
positive.code: 
    @override
    visitVariableDeclaration(VariableDeclaration node) {
      _assertLegacyType(node.element?.type);
      super.visitVariableDeclaration(node);
    }
  
  
negative.code: 
    @override
    visitFormalParameter(FormalParameter node) {
      _assertLegacyType(node.declaredElement?.type);
      super.visitFormalParameter(node);
    }
  
    @override
    visitFunctionDeclaration(FunctionDeclaration node) {
      _assertLegacyType(node.declaredElement?.type);
      super.visitFunctionDeclaration(node);
    }
  
  