File tree 2 files changed +15
-2
lines changed
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
14
14
final ExtensionTypeElement element;
15
15
16
16
late final ElementType representationType =
17
- getTypeFor (element.typeErasure , library);
17
+ getTypeFor (element.representation.type , library);
18
18
19
19
ExtensionType (this .element, super .library, super .packageGraph);
20
20
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ extension type One<E>(List<E> it) {
66
66
]);
67
67
}
68
68
69
- void test_representationType () async {
69
+ void test_representationType_class () async {
70
70
await createPackageWithLibrary ('''
71
71
class Foo<E> {}
72
72
extension type One<E>(Foo<E> it) {}
@@ -81,6 +81,19 @@ extension type One<E>(Foo<E> it) {}
81
81
]);
82
82
}
83
83
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
+
84
97
void test_classInterfaces () async {
85
98
await createPackageWithLibrary ('''
86
99
class Base<E> {}
You can’t perform that action at this time.
0 commit comments