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

Add co19 tests checking runtime and static types of class members with of covariant-by-class parameters #2127

Closed
sgrekhov opened this issue Jul 12, 2023 · 0 comments
Assignees
Labels
type-enhancement A request for a change that isn't a bug

Comments

@sgrekhov
Copy link
Contributor

For class like

class C<T> {
  void foo(T t) {}
}

we should expect that static type of C<int>.m is void Function(int) but dynamic type void Function(Object?). At run time a type check is performed to ensure that actual type argument is int

@sgrekhov sgrekhov self-assigned this Jul 13, 2023
@sgrekhov sgrekhov added the type-enhancement A request for a change that isn't a bug label Jul 13, 2023
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Jul 21, 2023
2023-07-21 sgrekhov22@gmail.com Fixes dart-lang/co19#2141. Add covariant instance variable tests (dart-lang/co19#2144)
2023-07-18 sgrekhov22@gmail.com dart-lang/co19#2138. Fix assertions in some functions tests (dart-lang/co19#2140)
2023-07-17 sgrekhov22@gmail.com Fixes dart-lang/co19#2136. Add type variable conflict test (dart-lang/co19#2137)
2023-07-14 sgrekhov22@gmail.com Fixes dart-lang/co19#2127. Add tests for covariant-by-class parameters (dart-lang/co19#2133)

Change-Id: I0eb608e6bebaf9bcf1acced5e6db98e5ce622979
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315400
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

1 participant