Skip to content

No error if an extension type implements an incompatible type #53170

@sgrekhov

Description

@sgrekhov

Expected error below is not reported nor by analyzer nor by CFE

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

extension type V1<T>(T id) {}

extension type V(num id) implements V1<String> {}
//                                  ^^
// [analyzer] unspecified
// [cfe] unspecified

main() {
  print(V1);
  print(V);
}

Tested on Dart SDK version: 3.2.0-36.0.dev (dev) (Thu Aug 3 17:04:06 2023 -0700) on "windows_x64" and on the edge SDK (Aug 10, 2023) on Linux x64

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions