File tree Expand file tree Collapse file tree 4 files changed +39
-1
lines changed
lib/src/services/correction
test/src/services/correction/fix Expand file tree Collapse file tree 4 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -1125,7 +1125,7 @@ CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_DISALLOWED_CLASS:
1125
1125
CompileTimeErrorCode.MIXIN_SUPER_CLASS_CONSTRAINT_NON_INTERFACE :
1126
1126
status : hasFix
1127
1127
CompileTimeErrorCode.MIXIN_WITH_NON_CLASS_SUPERCLASS :
1128
- status : noFix
1128
+ status : hasFix
1129
1129
CompileTimeErrorCode.MIXINS_SUPER_CLASS :
1130
1130
status : needsFix
1131
1131
notes : |-
Original file line number Diff line number Diff line change @@ -1361,6 +1361,10 @@ final _builtInNonLintMultiGenerators = {
1361
1361
DataDriven .new ,
1362
1362
ImportLibrary .forType,
1363
1363
],
1364
+ CompileTimeErrorCode .MIXIN_WITH_NON_CLASS_SUPERCLASS : [
1365
+ CreateClass .new ,
1366
+ ImportLibrary .forType,
1367
+ ],
1364
1368
CompileTimeErrorCode .NEW_WITH_NON_TYPE : [
1365
1369
CreateClass .new ,
1366
1370
ImportLibrary .forType,
Original file line number Diff line number Diff line change @@ -304,6 +304,22 @@ void f() {
304
304
await assertNoFix ();
305
305
}
306
306
307
+ Future <void > test_classContainingWith () async {
308
+ await resolveTestCode ('''
309
+ class B extends A with M {}
310
+
311
+ mixin M {}
312
+ ''' );
313
+ await assertHasFix ('''
314
+ class B extends A with M {}
315
+
316
+ class A {
317
+ }
318
+
319
+ mixin M {}
320
+ ''' );
321
+ }
322
+
307
323
Future <void > test_extends () async {
308
324
await resolveTestCode ('''
309
325
class MyClass extends BaseClass {}
Original file line number Diff line number Diff line change @@ -313,6 +313,24 @@ void f() {
313
313
await assertNoFix ();
314
314
}
315
315
316
+ Future <void > test_classContainingWith () async {
317
+ newFile ('$testPackageLibPath /lib.dart' , '''
318
+ class A {}
319
+ ''' );
320
+ await resolveTestCode ('''
321
+ class B extends A with M {}
322
+
323
+ mixin M {}
324
+ ''' );
325
+ await assertHasFix ('''
326
+ import 'package:test/lib.dart';
327
+
328
+ class B extends A with M {}
329
+
330
+ mixin M {}
331
+ ''' );
332
+ }
333
+
316
334
Future <void > test_extension_name () async {
317
335
createAnalysisOptionsFile (lints: [LintNames .comment_references]);
318
336
newFile ('$testPackageLibPath /lib.dart' , '''
You can’t perform that action at this time.
0 commit comments