File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed
pkg/analysis_server/test/src/services/correction/fix Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -478,6 +478,35 @@ class B extends A {
478
478
''' );
479
479
}
480
480
481
+ @FailingTest (issue: 'https://github.com/dart-lang/sdk/issues/43667' )
482
+ Future <void > test_method_withTypedef () async {
483
+ // This fails because the element representing `Base.closure` has a return
484
+ // type that has forgotten that it was declared using the typedef `Closure`.
485
+ await resolveTestUnit ('''
486
+ typedef Closure = T Function<T>(T input);
487
+
488
+ abstract class Base {
489
+ Closure closure();
490
+ }
491
+
492
+ class Concrete extends Base {}
493
+ ''' );
494
+ await assertHasFix ('''
495
+ typedef Closure = T Function<T>(T input);
496
+
497
+ abstract class Base {
498
+ Closure closure();
499
+ }
500
+
501
+ class Concrete extends Base {
502
+ @override
503
+ Closure closure() {
504
+ // TODO: implement closure
505
+ }
506
+ }
507
+ ''' );
508
+ }
509
+
481
510
Future <void > test_methods_reverseOrder () async {
482
511
await resolveTestUnit ('''
483
512
abstract class A {
You can’t perform that action at this time.
0 commit comments