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 tests for a compile-time error if type parameter occurs in a non-covariant position #2066

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

Comments

@sgrekhov
Copy link
Contributor

There are no any tests for the following statement from Dart Language Specification

10.10 Superinterfaces
...
When a generic class C declares a type parameter X, it is a compile-time
error if X occurs in a non-covariant position in a type which specifies a superinterface of C. For example, the class can not have List<void Function(X)> in its extends or implements clause.

Don't forget to add tests for type aliases, inline classes, different class modifiers etc

@sgrekhov sgrekhov added the type-enhancement A request for a change that isn't a bug label May 29, 2023
@sgrekhov sgrekhov self-assigned this May 29, 2023
sgrekhov added a commit to sgrekhov/co19 that referenced this issue May 29, 2023
copybara-service bot pushed a commit to dart-lang/sdk that referenced this issue Jun 1, 2023
2023-05-31 [email protected] Fixes dart-lang/co19#2069. Failing NNBD tests fixed (dart-lang/co19#2070)
2023-05-31 [email protected] dart-lang/co19#1400. Tests for constructors of inline classes added (dart-lang/co19#2065)
2023-05-30 [email protected] Fixes dart-lang/co19#2066. Update Superinterface tests according to the current specification (dart-lang/co19#2067)
2023-05-26 [email protected] dart-lang/co19#1400. Static analysis of inline class tests. Part 1 (dart-lang/co19#2058)
2023-05-25 [email protected] dart-lang/co19#1400. Dynamic Semantics of an Inline Member Invocation tests (dart-lang/co19#2053)
2023-05-24 [email protected] dart-lang/co19#1952. Constructor of classes that cannot be constructed cannot be torn off (dart-lang/co19#2063)

Change-Id: I634844738f85a55ee5750621ca1d85b52a9869a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306840
Reviewed-by: Alexander Thomas <[email protected]>
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