File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ class ExtensionType extends InheritingContainer
1414 final ExtensionTypeElement element;
1515
1616 late final ElementType representationType =
17- getTypeFor (element.typeErasure , library);
17+ getTypeFor (element.representation.type , library);
1818
1919 ExtensionType (this .element, super .library, super .packageGraph);
2020
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ extension type One<E>(List<E> it) {
6666 ]);
6767 }
6868
69- void test_representationType () async {
69+ void test_representationType_class () async {
7070 await createPackageWithLibrary ('''
7171class Foo<E> {}
7272extension type One<E>(Foo<E> it) {}
@@ -81,6 +81,19 @@ extension type One<E>(Foo<E> it) {}
8181 ]);
8282 }
8383
84+ void test_representationType_extensionType () async {
85+ await createPackageWithLibrary ('''
86+ extension type One(int one) {}
87+ extension type Two(One two) {}
88+ ''' );
89+ var htmlLines = readLines (['lib' , 'Two-extension-type.html' ]);
90+
91+ htmlLines.expectMainContentContainsAllInOrder ([
92+ matches ('<dt>on</dt>' ),
93+ matches ('<a href="../lib/One-extension-type.html">One</a>' ),
94+ ]);
95+ }
96+
8497 void test_classInterfaces () async {
8598 await createPackageWithLibrary ('''
8699class Base<E> {}
You can’t perform that action at this time.
0 commit comments