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

#1400. [Extension types] Add more superinterfaces tests #2315

Merged
merged 3 commits into from
Oct 18, 2023

Conversation

sgrekhov
Copy link
Contributor

No description provided.

Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! However, I think it would be valuable to add some test cases where the "A<T1>, A<T2>, T1 != T2" error exists because of A<T1> and A<T2> that occur in different syntactic locations.

@sgrekhov sgrekhov changed the title #1400. Add more superinterfaces tests #1400. [Extension types] Add more superinterfaces tests Oct 18, 2023
@sgrekhov
Copy link
Contributor Author

Updated. But there is no case

one in the current declaration and another in a superinterface

Could you show an example?

@sgrekhov sgrekhov requested a review from eernstg October 18, 2023 14:32
@eernstg
Copy link
Member

eernstg commented Oct 18, 2023

If I got the history right about where the little snippets of quoted text came from then this would be an example of 'one in the current declaration and another in a superinterface':

class A<X> {}
extension type ET1(A<Never> a) implements A<int> {}
extension type ET2(A<Never> a) implements ET1, A<String> {}

The point is that it is a conflict that ET2 implements A<int>, and ET2 implements A<String> at the same time, even in the case where the two types of the form A<...> do not occur in the same syntactic list.

@sgrekhov
Copy link
Contributor Author

Thank you! Tests added. Please review

Copy link
Member

@eernstg eernstg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eernstg eernstg merged commit b605171 into dart-lang:master Oct 18, 2023
2 checks passed
copybara-service bot pushed a commit to dart-lang/sdk that referenced this pull request Oct 24, 2023
2023-10-23 sgrekhov22@gmail.com Fixes dart-lang/co19#2319. Fix roll failures (dart-lang/co19#2321)
2023-10-23 sgrekhov22@gmail.com dart-lang/co19#1400. [Extension types] Add more top types tests (dart-lang/co19#2322)
2023-10-18 sgrekhov22@gmail.com dart-lang/co19#1400. [Extension types] Add more superinterfaces tests (dart-lang/co19#2315)
2023-10-18 sgrekhov22@gmail.com dart-lang/co19#2291. Add more Link.createSync() tests. Part 2 (dart-lang/co19#2316)
2023-10-17 sgrekhov22@gmail.com Fixes dart-lang/co19#2304. Add more `Object` member tests (dart-lang/co19#2312)
2023-10-17 sgrekhov22@gmail.com dart-lang/co19#2313. Fix expected static type in upper_bound_A01_t05.dart (dart-lang/co19#2314)

Change-Id: Id5279b7bad5e45c7e8a5d2fa7cbffe49bd1b2093
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/331860
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
@sgrekhov sgrekhov deleted the co19-1400-new-8 branch November 14, 2023 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants