Skip to content

[cfe] No error when an extension type implements two interfaces with different type parameters #53799

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
sgrekhov opened this issue Oct 19, 2023 · 0 comments
Assignees
Labels
cfe-feature-extension-types Implement extension types feature in the CFE front-end-missing-error legacy-area-front-end Legacy: Use area-dart-model instead.

Comments

@sgrekhov
Copy link
Contributor

The following tests fail on CFE (works in analyzer):
https://github.com/dart-lang/co19/blob/master/LanguageFeatures/Extension-types/superinterfaces_of_extension_type_A03_t03.dart
https://github.com/dart-lang/co19/blob/master/LanguageFeatures/Extension-types/superinterfaces_of_extension_type_A03_t05.dart
They looks like

// SharedOptions=--enable-experiment=inline-class

class A<T> {}

extension type A_ET1<T>(A<T> _) implements A<T> {}

extension type A_ET2<T>(A<T> _) implements A<T> {}

// Analyzer:  The extension type 'ET' can't implement both 'A<int>' and 'A<num>' because the type
//          arguments are different. • conflicting_generic_interfaces
// CFE: no expected error
extension type ET(A<int> _) implements A_ET1<int>, A_ET2<num> {}
//             ^^
// [analyzer] unspecified
// [cfe] unspecified
main() {
  print(ET);
}

Tested on Dart SDK version: 3.3.0-edge.e285a5724831d547f03d34764c0c08de998548db (be) (Thu Oct 19 03:46:18 2023 +0000) on "linux_x64"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cfe-feature-extension-types Implement extension types feature in the CFE front-end-missing-error legacy-area-front-end Legacy: Use area-dart-model instead.
Projects
None yet
Development

No branches or pull requests

2 participants