@@ -239,6 +239,33 @@ class A {
239
239
await testContents (contents);
240
240
}
241
241
242
+ Future <void > test_constructor_redirectingSuper_wildcards () async {
243
+ var contents = '''
244
+ class A {
245
+ final int x, y;
246
+ A(this.[!x!], [this.y = 0]);
247
+ }
248
+
249
+ class C extends A {
250
+ final int c;
251
+ C(this.c, super.^_);
252
+ }
253
+ ''' ;
254
+
255
+ await testContents (contents);
256
+ }
257
+
258
+ Future <void > test_constructor_thisReference_wildcards () async {
259
+ var contents = '''
260
+ class A {
261
+ final int [!_!];
262
+ A(this.^_);
263
+ }
264
+ ''' ;
265
+
266
+ await testContents (contents);
267
+ }
268
+
242
269
Future <void > test_constructorNamed () async {
243
270
var contents = '''
244
271
f() {
@@ -307,6 +334,17 @@ class [!A!] {
307
334
);
308
335
}
309
336
337
+ Future <void > test_field_underscore () async {
338
+ var contents = '''
339
+ class A {
340
+ int [!_!] = 1;
341
+ int f() => _^;
342
+ }
343
+ ''' ;
344
+
345
+ await testContents (contents);
346
+ }
347
+
310
348
Future <void > test_fieldFormalParam () async {
311
349
var contents = '''
312
350
class A {
@@ -663,6 +701,17 @@ class A {}
663
701
expect (getTextForRange (macroContent, location.targetSelectionRange), 'foo' );
664
702
}
665
703
704
+ Future <void > test_method_underscore () async {
705
+ var contents = '''
706
+ class A {
707
+ int [!_!]() => 1;
708
+ int f() => _^();
709
+ }
710
+ ''' ;
711
+
712
+ await testContents (contents);
713
+ }
714
+
666
715
Future <void > test_nonDartFile () async {
667
716
newFile (pubspecFilePath, simplePubspecContent);
668
717
await initialize ();
@@ -747,6 +796,15 @@ class B extends A {
747
796
await testContents (contents);
748
797
}
749
798
799
+ Future <void > test_topLevelVariable_underscore () async {
800
+ var contents = '''
801
+ int [!_!] = 0;
802
+ int f = ^_;
803
+ ''' ;
804
+
805
+ await testContents (contents);
806
+ }
807
+
750
808
Future <void > test_type () async {
751
809
var contents = '''
752
810
f() {
0 commit comments