anchor.diff:  ''');
     }
   
  -  test_notGeneric_hasName_constant() async {
  +  test_class_notGeneric_hasName_constant() async {
       await assertNoErrorsInCode(r'''
   abstract class A {
     int get foo;
  
positive.code: 
  @reflectiveTest
  class ExtractorPatternResolutionTest extends PatternsResolutionTest {
    test_generic_noTypeArguments_infer_interfaceType() async {
      await assertNoErrorsInCode(r'''
  class A<T> {}
  class B<T> extends A<T> {}
  
negative.code:   rightParenthesis: )
  ''');
    }
  
    test_typedef_dynamic_hasName_unresolved() async {
      await assertNoErrorsInCode(r'''
  typedef A = dynamic;
  
  void f(Object? x) {
    switch (x) {
      case A(foo: var y):
        break;
    }
  }
  ''');
      final node = findNode.switchPatternCase('case').pattern;
      assertResolvedNodeText(node, r'''
  ExtractorPattern
    type: NamedType
      name: SimpleIdentifier
        token: A
        staticElement: self::@typeAlias::A
        staticType: null
      type: dynamic
    leftParenthesis: (
    fields
      RecordPatternField
        fieldName: RecordPatternFieldName
          name: foo
          colon: :
        pattern: VariablePattern
          keyword: var
          name: y
          declaredElement: hasImplicitType y@77
            type: dynamic
        fieldElement: <null>
    rightParenthesis: )
  ''');
    }
  
    test_typedef_functionType_generic_withTypeArguments_hasName_extensionGetter() async {
      await assertNoErrorsInCode(r'''
  typedef A<T> = T Function();
  
  extension E on int Function() {
    int get foo => 0;
  }
  
  void f(Object? x) {
    switch (x) {
      case A<int>(foo: var y):
        break;
    }
  }
  ''');
      final node = findNode.switchPatternCase('case').pattern;
      assertResolvedNodeText(node, r'''
  ExtractorPattern
    type: NamedType
      name: SimpleIdentifier
        token: A
        staticElement: self::@typeAlias::A
        staticType: null
      typeArguments: TypeArgumentList
        leftBracket: <
        arguments
          NamedType
            name: SimpleIdentifier
              token: int
              staticElement: dart:core::@class::int
              staticType: null
            type: int
        rightBracket: >
      type: int Function()
        alias: self::@typeAlias::A
          typeArguments
            int
    leftParenthesis: (
    fields
      RecordPatternField
        fieldName: RecordPatternFieldName
          name: foo
          colon: :
        pattern: VariablePattern
          keyword: var
          name: y
          declaredElement: hasImplicitType y@145
            type: int
        fieldElement: self::@extension::E::@getter::foo
    rightParenthesis: )
  ''');
    }
  
    test_typedef_functionType_notGeneric_hasName_extensionGetter() async {
      await assertNoErrorsInCode(r'''
  typedef A = void Function();
  
  extension E on void Function() {
    int get foo => 0;
  }
  
  void f(Object? x) {
    switch (x) {
      case A(foo: var y):
        break;
    }
  }
  ''');
      final node = findNode.switchPatternCase('case').pattern;
      assertResolvedNodeText(node, r'''
  ExtractorPattern
    type: NamedType
      name: SimpleIdentifier
        token: A
        staticElement: self::@typeAlias::A
        staticType: null
      type: void Function()
        alias: self::@typeAlias::A
    leftParenthesis: (
    fields
      RecordPatternField
        fieldName: RecordPatternFieldName
          name: foo
          colon: :
        pattern: VariablePattern
          keyword: var
          name: y
          declaredElement: hasImplicitType y@141
            type: int
        fieldElement: self::@extension::E::@getter::foo
    rightParenthesis: )
  ''');
    }
  
    test_typedef_functionType_notGeneric_hasName_hashCode() async {
      await assertNoErrorsInCode(r'''
  typedef A = void Function();
  
  void f(Object? x) {
    switch (x) {
      case A(hashCode: var y):
        break;
    }
  }
  ''');
      final node = findNode.switchPatternCase('case').pattern;
      assertResolvedNodeText(node, r'''
  ExtractorPattern
    type: NamedType
      name: SimpleIdentifier
        token: A
        staticElement: self::@typeAlias::A
        staticType: null
      type: void Function()
        alias: self::@typeAlias::A
    leftParenthesis: (
    fields
      RecordPatternField
        fieldName: RecordPatternFieldName
          name: hashCode
          colon: :
        pattern: VariablePattern
          keyword: var
          name: y
          declaredElement: hasImplicitType y@90
            type: int
        fieldElement: dart:core::@class::Object::@getter::hashCode
    rightParenthesis: )
  ''');
    }
  
    test_typedef_functionType_notGeneric_hasName_unresolved() async {
      await assertErrorsInCode(r'''
  typedef A = void Function();
  
  void f(Object? x) {
    switch (x) {
      case A(foo: var y):
        break;
    }
  }
  ''', [
        error(CompileTimeErrorCode.UNDEFINED_GETTER, 76, 3),
      ]);
      final node = findNode.switchPatternCase('case').pattern;
      assertResolvedNodeText(node, r'''
  ExtractorPattern
    type: NamedType
      name: SimpleIdentifier
        token: A
        staticElement: self::@typeAlias::A
        staticType: null
      type: void Function()
        alias: self::@typeAlias::A
    leftParenthesis: (
    fields
      RecordPatternField
        fieldName: RecordPatternFieldName
          name: foo
          colon: :
        pattern: VariablePattern
          keyword: var
          name: y
          declaredElement: hasImplicitType y@85
            type: dynamic
        fieldElement: <null>
    rightParenthesis: )
  ''');
    }
  
    test_typedef_recordType_notGeneric_hasName_named() async {
      await assertNoErrorsInCode(r'''
  typedef A = ({int foo});
  
  void f(x) {
    switch (x) {
      case A(foo: var y):
        break;
    }
  }
  ''');
      final node = findNode.switchPatternCase('case').pattern;
      assertResolvedNodeText(node, r'''
  ExtractorPattern
    type: NamedType
      name: SimpleIdentifier
        token: A
        staticElement: self::@typeAlias::A
        staticType: null
      type: ({int foo})
        alias: self::@typeAlias::A
    leftParenthesis: (
    fields
      RecordPatternField
        fieldName: RecordPatternFieldName
          name: foo
          colon: :
        pattern: VariablePattern
          keyword: var
          name: y
          declaredElement: hasImplicitType y@73
            type: int
        fieldElement: <null>
    rightParenthesis: )
  ''');
    }
  
    test_typedef_recordType_notGeneric_hasName_positional() async {
      await assertNoErrorsInCode(r'''
  typedef A = (int foo,);
  
  void f(x) {
    switch (x) {
      case A($0: var y):
        break;
    }
  }
  ''');
      final node = findNode.switchPatternCase('case').pattern;
      assertResolvedNodeText(node, r'''
  ExtractorPattern
    type: NamedType
      name: SimpleIdentifier
        token: A
        staticElement: self::@typeAlias::A
        staticType: null
      type: (int)
        alias: self::@typeAlias::A
    leftParenthesis: (
    fields
      RecordPatternField
        fieldName: RecordPatternFieldName
          name: $0
          colon: :
        pattern: VariablePattern
          keyword: var
          name: y
          declaredElement: hasImplicitType y@71
            type: int
        fieldElement: <null>
    rightParenthesis: )
  ''');
    }
  }
  