File tree 3 files changed +15
-26
lines changed
pkg/analyzer/test/src/dart/resolution 3 files changed +15
-26
lines changed Original file line number Diff line number Diff line change @@ -3263,7 +3263,6 @@ bar() {
3263
3263
}
3264
3264
''' );
3265
3265
3266
- assertTypeAliasRef (findNode.simple ('TA.' ), findElement.typeAlias ('TA' ));
3267
3266
var reference = findNode.functionReference ('foo<int>;' );
3268
3267
assertResolvedNodeText (reference, r'''
3269
3268
FunctionReference
Original file line number Diff line number Diff line change @@ -133,22 +133,21 @@ void f() {
133
133
}
134
134
''' );
135
135
136
- assertPrefixedIdentifier (
137
- findNode.prefixed ('B.foo' ),
138
- element: findElement.getter ('foo' ),
139
- type: 'int' ,
140
- );
141
-
142
- assertTypeAliasRef (
143
- findNode.simple ('B.foo' ),
144
- findElement.typeAlias ('B' ),
145
- );
146
-
147
- assertSimpleIdentifier (
148
- findNode.simple ('foo;' ),
149
- element: findElement.getter ('foo' ),
150
- type: 'int' ,
151
- );
136
+ final node = findNode.prefixed ('B.foo' );
137
+ assertResolvedNodeText (node, r'''
138
+ PrefixedIdentifier
139
+ prefix: SimpleIdentifier
140
+ token: B
141
+ staticElement: self::@typeAlias::B
142
+ staticType: null
143
+ period: .
144
+ identifier: SimpleIdentifier
145
+ token: foo
146
+ staticElement: self::@class::A::@getter::foo
147
+ staticType: int
148
+ staticElement: self::@class::A::@getter::foo
149
+ staticType: int
150
+ ''' );
152
151
}
153
152
154
153
test_implicitCall_tearOff_nullable () async {
Original file line number Diff line number Diff line change @@ -528,15 +528,6 @@ mixin ResolutionTest implements ResourceProviderMixin {
528
528
}
529
529
}
530
530
531
- /// Assert that the given [identifier] is a reference to a type alias, in the
532
- /// form that is not a separate expression, e.g. in a static method
533
- /// invocation like `C.staticMethod()` , or a type annotation `C c = null` .
534
- void assertTypeAliasRef (
535
- SimpleIdentifier identifier, TypeAliasElement expected) {
536
- assertElement (identifier, expected);
537
- assertTypeNull (identifier);
538
- }
539
-
540
531
void assertTypeDynamic (Object ? typeOrExpression) {
541
532
DartType ? actual;
542
533
if (typeOrExpression is DartType ? ) {
You can’t perform that action at this time.
0 commit comments