File tree 2 files changed +13
-0
lines changed 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,11 @@ class _Visitor extends SimpleAstVisitor<void> {
142
142
return ;
143
143
}
144
144
145
+ // extension type N(Null _) ...
146
+ if (parent is RepresentationDeclaration ) {
147
+ return ;
148
+ }
149
+
145
150
// https://github.com/dart-lang/linter/issues/2792
146
151
if (parent is MethodDeclaration &&
147
152
isVoidIncompatibleOverride (parent, node)) {
Original file line number Diff line number Diff line change @@ -39,6 +39,14 @@ void f(int a) {
39
39
]);
40
40
}
41
41
42
+ /// https://github.com/dart-lang/linter/issues/4759
43
+ test_extensionTypeRepresentation () async {
44
+ await assertNoDiagnostics (r'''
45
+ extension type B<T>(T? _) {}
46
+ extension type N(Null _) implements B<Never> {}
47
+ ''' );
48
+ }
49
+
42
50
test_localVariable () async {
43
51
await assertNoDiagnostics (r'''
44
52
void f() {
You can’t perform that action at this time.
0 commit comments