File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -317,6 +317,7 @@ class _TypeVisitor extends RecursiveElementVisitor<void> {
317317
318318 @override
319319 void visitTypeAliasElement (TypeAliasElement element) {
320+ _addType (element.aliasedType);
320321 _elements.add (element);
321322 super .visitTypeAliasElement (element);
322323 }
Original file line number Diff line number Diff line change @@ -3583,18 +3583,21 @@ void main() {
35833583 expect (mocksContent, contains ('implements _i2.Baz' ));
35843584 });
35853585
3586- test ('when a type parameter is a typedef a function' , () async {
3586+ test (
3587+ 'when a type parameter is a typedef a function which returns another type' ,
3588+ () async {
35873589 final mocksContent = await buildWithNonNullable ({
35883590 ...annotationsAsset,
35893591 'foo|lib/foo.dart' : dedent (r'''
3590- typedef CreateInt = int Function();
3592+ class Bar {}
3593+ typedef CreateBar = Bar Function();
35913594
35923595 class BaseFoo<T> {
35933596 BaseFoo(this.t);
35943597 final T t;
35953598 }
35963599
3597- class Foo extends BaseFoo<CreateInt > {
3600+ class Foo extends BaseFoo<CreateBar > {
35983601 Foo() : super(() => 1);
35993602 }
36003603 ''' ),
You can’t perform that action at this time.
0 commit comments