Skip to content

[cfe] Wrong type of extension type constructors tear-off #53211

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 Aug 14, 2023 · 0 comments
Closed

[cfe] Wrong type of extension type constructors tear-off #53211

sgrekhov opened this issue Aug 14, 2023 · 0 comments
Assignees
Labels
legacy-area-front-end Legacy: Use area-dart-model instead.

Comments

@sgrekhov
Copy link
Contributor

The following test fails in CFE (works in Analyzer)

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

import "../../Utils/static_type_helper.dart";

extension type ET1(int id) {}

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

extension type ET3.new(int id) {}

extension type ET4<T>.new(T id) {}

extension type ET5.n(int id) {}

extension type ET6<T>.n(T id) {}

main() {
  ET1.new.expectStaticType<Exactly<ET1 Function(int)>>();
  ET2<String>.new.expectStaticType<Exactly<ET2<String> Function(String)>>();
  ET3.new.expectStaticType<Exactly<ET3 Function(int)>>();
  ET4<String>.new.expectStaticType<Exactly<ET4<String> Function(String)>>();
  ET5.n.expectStaticType<Exactly<ET5 Function(int)>>();
  ET6<String>.n.expectStaticType<Exactly<ET6<String> Function(String)>>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
legacy-area-front-end Legacy: Use area-dart-model instead.
Projects
None yet
Development

No branches or pull requests

2 participants