Skip to content

Analyzer does not check that bounds are satisfied by generic metadata arguments #45579

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

Closed
leafpetersen opened this issue Apr 3, 2021 · 1 comment
Assignees
Labels
legacy-area-analyzer Use area-devexp instead.

Comments

@leafpetersen
Copy link
Member

The following example should be an error, since String is an invalid type argument for the generic class Y:

class Y<T extends num> {
  const Y();
}

@Y<String>()

class Test1 {}

The analyzer currently issues no errors on this code when run with --experiment=generic-metadata.

This is tests by co19/src/Language/Metadata/syntax_t11.dart, but unfortunately that test is broken pending the next co19 roll.

cc @devoncarew @scheglov @natebosch

@leafpetersen leafpetersen added the legacy-area-analyzer Use area-devexp instead. label Apr 3, 2021
@leafpetersen leafpetersen changed the title Analyzer does not check that bounds are satisfied be generic metadata arguments Analyzer does not check that bounds are satisfied by generic metadata arguments Apr 3, 2021
@scheglov scheglov self-assigned this Apr 3, 2021
@scheglov
Copy link
Contributor

scheglov commented Apr 3, 2021

dart-bot pushed a commit that referenced this issue Apr 3, 2021
…NOT_MATCHING_BOUNDS.

Bug: #45579
Change-Id: I757f4d782895fb1a9c89d8238a7929e12d6a6eed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194000
Reviewed-by: Brian Wilkerson <[email protected]>
Commit-Queue: Konstantin Shcheglov <[email protected]>
@scheglov scheglov closed this as completed Apr 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-analyzer Use area-devexp instead.
Projects
None yet
Development

No branches or pull requests

2 participants