diff --git a/pkg/analyzer/test/src/dart/resolution/property_access_test.dart b/pkg/analyzer/test/src/dart/resolution/property_access_test.dart index 240c48423ba6..7e4041cb28f8 100644 --- a/pkg/analyzer/test/src/dart/resolution/property_access_test.dart +++ b/pkg/analyzer/test/src/dart/resolution/property_access_test.dart @@ -311,6 +311,34 @@ PropertyAccess '''); } + test_inClass_superExpression_identifier_setter() async { + await assertErrorsInCode(''' +class A { + set foo(int _) {} + + void f() { + super.foo; + } +} +''', [ + error(CompileTimeErrorCode.UNDEFINED_SUPER_GETTER, 54, 3), + ]); + + var node = findNode.propertyAccess('foo;'); + assertResolvedNodeText(node, r''' +PropertyAccess + target: SuperExpression + superKeyword: super + staticType: A + operator: . + propertyName: SimpleIdentifier + token: foo + staticElement: + staticType: InvalidType + staticType: InvalidType +'''); + } + test_inClass_superQualifier_identifier_getter() async { await assertNoErrorsInCode(''' class A { @@ -455,34 +483,6 @@ PropertyAccess '''); } - test_inClass_thisExpression_identifier_setter() async { - await assertErrorsInCode(''' -class A { - set foo(int _) {} - - void f() { - super.foo; - } -} -''', [ - error(CompileTimeErrorCode.UNDEFINED_SUPER_GETTER, 54, 3), - ]); - - var node = findNode.propertyAccess('foo;'); - assertResolvedNodeText(node, r''' -PropertyAccess - target: SuperExpression - superKeyword: super - staticType: A - operator: . - propertyName: SimpleIdentifier - token: foo - staticElement: - staticType: InvalidType - staticType: InvalidType -'''); - } - test_inExtensionType_explicitThis_declared() async { await assertNoErrorsInCode(r''' extension type A(int it) {