Closed
Description
Extension type spec was recently relaxed and now allows representation type to be a subtype of a superinterface. So the following test should work (but it doesn't in the current CFE)
// SharedOptions=--enable-experiment=inline-class
import "../../Utils/expect.dart";
extension type V1(num _) {}
extension type V2(int _) implements V1 {}
extension type ET(V2 id) implements V1 {}
main() {
Expect.equals(42, ET(V2(42)).id);
}
Related analyzer issue #53866
Tested on Dart SDK version: 3.3.0-edge.3a41ee6d8d01bb7bfc873c8b7fa700778574ebed (be) (Thu Oct 26 08:11:11 2023 +0000) on "macos_x64"
Metadata
Metadata
Assignees
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity