Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typed parameters are not correctly generated #469

Closed
llfbandit opened this issue Sep 2, 2021 · 1 comment
Closed

Typed parameters are not correctly generated #469

llfbandit opened this issue Sep 2, 2021 · 1 comment
Assignees
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@llfbandit
Copy link

With version 5.0.15. (not tested with previous versions)

For an annotation like this:

@GenerateMocks(
  [],
  customMocks: [MockSpec<ICall<List<Location>>>(as: #MockLocationsCall)],
)

The generated mock definition looks like this:

class MockLocationsCall extends _i1.Mock implements _i4.ICall<List<Location>> { // wrong implements definition
  @override
  _i3.Future<List<_i12.Location>> execute() ... // correctly generated
}

It should generate it with _i12.Location typed parameter alias:

class MockLocationsCall extends _i1.Mock implements _i4.ICall<List<_i12.Location>> {
  @override
  _i3.Future<List<_i12.Location>> execute() ...
}
@llfbandit llfbandit changed the title Typed paremeters are not correctly generated Typed parameters are not correctly generated Sep 2, 2021
@srawlins
Copy link
Member

srawlins commented Sep 3, 2021

Thanks for the report!

@srawlins srawlins added the type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) label Sep 3, 2021
@srawlins srawlins self-assigned this Sep 10, 2021
srawlins added a commit that referenced this issue Sep 10, 2021
mosuem pushed a commit to dart-lang/test that referenced this issue Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

2 participants