mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:09:48 +00:00
[analysis_server] Remove interface, final, and sealed mixins from the analysis server.
Change-Id: Id774379c92904f27326f502299c67adb825a00b5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290914 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Kallen Tu <kallentu@google.com>
This commit is contained in:
parent
2e19faaec9
commit
2407f7338d
|
@ -1144,11 +1144,7 @@ class _DartUnitHighlightsComputerVisitor extends RecursiveAstVisitor<void> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void visitMixinDeclaration(MixinDeclaration node) {
|
void visitMixinDeclaration(MixinDeclaration node) {
|
||||||
computer._addRegion_token(node.sealedKeyword, HighlightRegionType.BUILT_IN);
|
|
||||||
computer._addRegion_token(node.baseKeyword, HighlightRegionType.BUILT_IN);
|
computer._addRegion_token(node.baseKeyword, HighlightRegionType.BUILT_IN);
|
||||||
computer._addRegion_token(
|
|
||||||
node.interfaceKeyword, HighlightRegionType.BUILT_IN);
|
|
||||||
computer._addRegion_token(node.finalKeyword, HighlightRegionType.BUILT_IN);
|
|
||||||
computer._addRegion_token(node.mixinKeyword, HighlightRegionType.BUILT_IN);
|
computer._addRegion_token(node.mixinKeyword, HighlightRegionType.BUILT_IN);
|
||||||
super.visitMixinDeclaration(node);
|
super.visitMixinDeclaration(node);
|
||||||
}
|
}
|
||||||
|
|
|
@ -120,9 +120,6 @@ class LibraryElementSuggestionBuilder extends GeneralizingElementVisitor<void> {
|
||||||
if (node is ImplementsClause &&
|
if (node is ImplementsClause &&
|
||||||
!element.isImplementableIn(request.libraryElement)) {
|
!element.isImplementableIn(request.libraryElement)) {
|
||||||
return;
|
return;
|
||||||
} else if (node is WithClause &&
|
|
||||||
!element.isMixableIn(request.libraryElement)) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
_visitInterfaceElement(element);
|
_visitInterfaceElement(element);
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,11 @@ class ConvertClassToMixin extends CorrectionProducer {
|
||||||
.any((member) => member is ConstructorDeclaration)) {
|
.any((member) => member is ConstructorDeclaration)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (classDeclaration.finalKeyword != null ||
|
||||||
|
classDeclaration.interfaceKeyword != null ||
|
||||||
|
classDeclaration.sealedKeyword != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
var finder = _SuperclassReferenceFinder();
|
var finder = _SuperclassReferenceFinder();
|
||||||
classDeclaration.accept(finder);
|
classDeclaration.accept(finder);
|
||||||
var referencedClasses = finder.referencedClasses;
|
var referencedClasses = finder.referencedClasses;
|
||||||
|
|
|
@ -225,9 +225,6 @@ class MoveTopLevelToFile extends RefactoringProducer {
|
||||||
validSelection(node.name)) {
|
validSelection(node.name)) {
|
||||||
name = node.name.lexeme;
|
name = node.name.lexeme;
|
||||||
} else if (node is MixinDeclaration && validSelection(node.name)) {
|
} else if (node is MixinDeclaration && validSelection(node.name)) {
|
||||||
if (node.sealedKeyword != null) {
|
|
||||||
sealedDeclarations.add(node);
|
|
||||||
}
|
|
||||||
name = node.name.lexeme;
|
name = node.name.lexeme;
|
||||||
} else if (node is TopLevelVariableDeclaration) {
|
} else if (node is TopLevelVariableDeclaration) {
|
||||||
var variables = node.variables.variables;
|
var variables = node.variables.variables;
|
||||||
|
@ -410,7 +407,7 @@ class _MembersToMove {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// A helper to for matching sealed classes/mixins to their subclasses.
|
/// A helper to for matching sealed classes to their subclasses.
|
||||||
class _SealedSubclassIndex {
|
class _SealedSubclassIndex {
|
||||||
final CompilationUnit unit;
|
final CompilationUnit unit;
|
||||||
|
|
||||||
|
@ -499,9 +496,6 @@ class _SealedSubclassIndex {
|
||||||
return const [];
|
return const [];
|
||||||
}
|
}
|
||||||
|
|
||||||
bool _isSealed(Element element) {
|
bool _isSealed(Element element) =>
|
||||||
var isSealedClass = element is ClassElement && element.isSealed;
|
element is ClassElement && element.isSealed;
|
||||||
var isSealedMixin = element is MixinElement && element.isSealed;
|
|
||||||
return isSealedClass || isSealedMixin;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1229,26 +1229,6 @@ base mixin A {}
|
||||||
expect(hover.propagatedType, isNull);
|
expect(hover.propagatedType, isNull);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> test_mixin_declaration_final() async {
|
|
||||||
newFile(testFilePath, '''
|
|
||||||
final mixin A {}
|
|
||||||
''');
|
|
||||||
var hover = await prepareHover('A');
|
|
||||||
expect(hover.elementDescription, 'final mixin A on Object');
|
|
||||||
expect(hover.staticType, isNull);
|
|
||||||
expect(hover.propagatedType, isNull);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> test_mixin_declaration_interface() async {
|
|
||||||
newFile(testFilePath, '''
|
|
||||||
interface mixin A {}
|
|
||||||
''');
|
|
||||||
var hover = await prepareHover('A');
|
|
||||||
expect(hover.elementDescription, 'interface mixin A on Object');
|
|
||||||
expect(hover.staticType, isNull);
|
|
||||||
expect(hover.propagatedType, isNull);
|
|
||||||
}
|
|
||||||
|
|
||||||
@failingTest
|
@failingTest
|
||||||
Future<void> test_mixin_reference() async {
|
Future<void> test_mixin_reference() async {
|
||||||
newFile(testFilePath, '''
|
newFile(testFilePath, '''
|
||||||
|
|
|
@ -242,7 +242,6 @@ void f() {
|
||||||
Future<void> test_BUILT_IN_final() async {
|
Future<void> test_BUILT_IN_final() async {
|
||||||
addTestFile('''
|
addTestFile('''
|
||||||
final class A {}
|
final class A {}
|
||||||
final mixin M {}
|
|
||||||
final class B = Object with M;
|
final class B = Object with M;
|
||||||
void f() {
|
void f() {
|
||||||
var final = 42;
|
var final = 42;
|
||||||
|
@ -250,7 +249,6 @@ void f() {
|
||||||
''');
|
''');
|
||||||
await prepareHighlights();
|
await prepareHighlights();
|
||||||
assertHasRegion(HighlightRegionType.BUILT_IN, 'final class A');
|
assertHasRegion(HighlightRegionType.BUILT_IN, 'final class A');
|
||||||
assertHasRegion(HighlightRegionType.BUILT_IN, 'final mixin M');
|
|
||||||
assertHasRegion(HighlightRegionType.BUILT_IN, 'final class B');
|
assertHasRegion(HighlightRegionType.BUILT_IN, 'final class B');
|
||||||
assertNoRegion(HighlightRegionType.BUILT_IN, 'final = 42');
|
assertNoRegion(HighlightRegionType.BUILT_IN, 'final = 42');
|
||||||
}
|
}
|
||||||
|
@ -319,7 +317,6 @@ void f() {
|
||||||
Future<void> test_BUILT_IN_interface() async {
|
Future<void> test_BUILT_IN_interface() async {
|
||||||
addTestFile('''
|
addTestFile('''
|
||||||
interface class A {}
|
interface class A {}
|
||||||
interface mixin M {}
|
|
||||||
interface class B = Object with M;
|
interface class B = Object with M;
|
||||||
void f() {
|
void f() {
|
||||||
var interface = 42;
|
var interface = 42;
|
||||||
|
@ -327,7 +324,6 @@ void f() {
|
||||||
''');
|
''');
|
||||||
await prepareHighlights();
|
await prepareHighlights();
|
||||||
assertHasRegion(HighlightRegionType.BUILT_IN, 'interface class A');
|
assertHasRegion(HighlightRegionType.BUILT_IN, 'interface class A');
|
||||||
assertHasRegion(HighlightRegionType.BUILT_IN, 'interface mixin M');
|
|
||||||
assertHasRegion(HighlightRegionType.BUILT_IN, 'interface class B');
|
assertHasRegion(HighlightRegionType.BUILT_IN, 'interface class B');
|
||||||
assertNoRegion(HighlightRegionType.BUILT_IN, 'interface = 42');
|
assertNoRegion(HighlightRegionType.BUILT_IN, 'interface = 42');
|
||||||
}
|
}
|
||||||
|
@ -437,7 +433,6 @@ void f() {
|
||||||
Future<void> test_BUILT_IN_sealed() async {
|
Future<void> test_BUILT_IN_sealed() async {
|
||||||
addTestFile('''
|
addTestFile('''
|
||||||
sealed class A {}
|
sealed class A {}
|
||||||
sealed mixin M {}
|
|
||||||
sealed class B = Object with M;
|
sealed class B = Object with M;
|
||||||
void f() {
|
void f() {
|
||||||
var sealed = 42;
|
var sealed = 42;
|
||||||
|
@ -445,7 +440,6 @@ void f() {
|
||||||
''');
|
''');
|
||||||
await prepareHighlights();
|
await prepareHighlights();
|
||||||
assertHasRegion(HighlightRegionType.BUILT_IN, 'sealed class A');
|
assertHasRegion(HighlightRegionType.BUILT_IN, 'sealed class A');
|
||||||
assertHasRegion(HighlightRegionType.BUILT_IN, 'sealed mixin M');
|
|
||||||
assertHasRegion(HighlightRegionType.BUILT_IN, 'sealed class B');
|
assertHasRegion(HighlightRegionType.BUILT_IN, 'sealed class B');
|
||||||
assertNoRegion(HighlightRegionType.BUILT_IN, 'sealed = 42');
|
assertNoRegion(HighlightRegionType.BUILT_IN, 'sealed = 42');
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,9 +143,6 @@ suggestions
|
||||||
Future<void> test_mixin_inside() async {
|
Future<void> test_mixin_inside() async {
|
||||||
await computeSuggestions('''
|
await computeSuggestions('''
|
||||||
base mixin FooBase {}
|
base mixin FooBase {}
|
||||||
interface mixin FooInterface {}
|
|
||||||
final mixin FooFinal {}
|
|
||||||
sealed mixin FooSealed {}
|
|
||||||
class A implements ^
|
class A implements ^
|
||||||
''');
|
''');
|
||||||
|
|
||||||
|
@ -153,12 +150,6 @@ class A implements ^
|
||||||
suggestions
|
suggestions
|
||||||
FooBase
|
FooBase
|
||||||
kind: mixin
|
kind: mixin
|
||||||
FooFinal
|
|
||||||
kind: mixin
|
|
||||||
FooInterface
|
|
||||||
kind: mixin
|
|
||||||
FooSealed
|
|
||||||
kind: mixin
|
|
||||||
''');
|
''');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,63 +169,6 @@ suggestions
|
||||||
} else {
|
} else {
|
||||||
assertResponse('''
|
assertResponse('''
|
||||||
suggestions
|
suggestions
|
||||||
''');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> test_mixin_outside_final() async {
|
|
||||||
newFile('$testPackageLibPath/a.dart', 'final mixin Foo {}');
|
|
||||||
await computeSuggestions('''
|
|
||||||
lib B;
|
|
||||||
import 'a.dart';
|
|
||||||
class A implements ^
|
|
||||||
''');
|
|
||||||
|
|
||||||
if (isProtocolVersion1) {
|
|
||||||
assertResponse('''
|
|
||||||
suggestions
|
|
||||||
Foo
|
|
||||||
kind: mixin
|
|
||||||
''');
|
|
||||||
} else {
|
|
||||||
assertResponse('''
|
|
||||||
suggestions
|
|
||||||
''');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> test_mixin_outside_interface() async {
|
|
||||||
newFile('$testPackageLibPath/a.dart', 'interface mixin Foo {}');
|
|
||||||
await computeSuggestions('''
|
|
||||||
lib B;
|
|
||||||
import 'a.dart';
|
|
||||||
class A implements ^
|
|
||||||
''');
|
|
||||||
|
|
||||||
assertResponse('''
|
|
||||||
suggestions
|
|
||||||
Foo
|
|
||||||
kind: mixin
|
|
||||||
''');
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> test_mixin_outside_sealed() async {
|
|
||||||
newFile('$testPackageLibPath/a.dart', 'sealed mixin Foo {}');
|
|
||||||
await computeSuggestions('''
|
|
||||||
lib B;
|
|
||||||
import 'a.dart';
|
|
||||||
class A implements ^
|
|
||||||
''');
|
|
||||||
|
|
||||||
if (isProtocolVersion1) {
|
|
||||||
assertResponse('''
|
|
||||||
suggestions
|
|
||||||
Foo
|
|
||||||
kind: mixin
|
|
||||||
''');
|
|
||||||
} else {
|
|
||||||
assertResponse('''
|
|
||||||
suggestions
|
|
||||||
''');
|
''');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,12 +94,9 @@ suggestions
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> test_mixin_inside() async {
|
Future<void> test_mixin_base_inside() async {
|
||||||
await computeSuggestions('''
|
await computeSuggestions('''
|
||||||
base mixin FooBase {}
|
base mixin FooBase {}
|
||||||
interface mixin FooInterface {}
|
|
||||||
final mixin FooFinal {}
|
|
||||||
sealed mixin FooSealed {}
|
|
||||||
class A with ^
|
class A with ^
|
||||||
''');
|
''');
|
||||||
|
|
||||||
|
@ -107,16 +104,10 @@ class A with ^
|
||||||
suggestions
|
suggestions
|
||||||
FooBase
|
FooBase
|
||||||
kind: mixin
|
kind: mixin
|
||||||
FooFinal
|
|
||||||
kind: mixin
|
|
||||||
FooInterface
|
|
||||||
kind: mixin
|
|
||||||
FooSealed
|
|
||||||
kind: mixin
|
|
||||||
''');
|
''');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> test_mixin_outside_base() async {
|
Future<void> test_mixin_base_outside() async {
|
||||||
newFile('$testPackageLibPath/a.dart', 'base mixin Foo {}');
|
newFile('$testPackageLibPath/a.dart', 'base mixin Foo {}');
|
||||||
await computeSuggestions('''
|
await computeSuggestions('''
|
||||||
import 'a.dart';
|
import 'a.dart';
|
||||||
|
@ -130,70 +121,7 @@ suggestions
|
||||||
''');
|
''');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> test_mixin_outside_final() async {
|
Future<void> test_mixinClass_base_inside() async {
|
||||||
newFile('$testPackageLibPath/a.dart', 'final mixin Foo {}');
|
|
||||||
await computeSuggestions('''
|
|
||||||
lib B;
|
|
||||||
import 'a.dart';
|
|
||||||
class A with ^
|
|
||||||
''');
|
|
||||||
|
|
||||||
if (isProtocolVersion1) {
|
|
||||||
assertResponse('''
|
|
||||||
suggestions
|
|
||||||
Foo
|
|
||||||
kind: mixin
|
|
||||||
''');
|
|
||||||
} else {
|
|
||||||
assertResponse('''
|
|
||||||
suggestions
|
|
||||||
''');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> test_mixin_outside_interface() async {
|
|
||||||
newFile('$testPackageLibPath/a.dart', 'interface mixin Foo {}');
|
|
||||||
await computeSuggestions('''
|
|
||||||
lib B;
|
|
||||||
import 'a.dart';
|
|
||||||
class A with ^
|
|
||||||
''');
|
|
||||||
|
|
||||||
if (isProtocolVersion1) {
|
|
||||||
assertResponse('''
|
|
||||||
suggestions
|
|
||||||
Foo
|
|
||||||
kind: mixin
|
|
||||||
''');
|
|
||||||
} else {
|
|
||||||
assertResponse('''
|
|
||||||
suggestions
|
|
||||||
''');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> test_mixin_outside_sealed() async {
|
|
||||||
newFile('$testPackageLibPath/a.dart', 'sealed mixin Foo {}');
|
|
||||||
await computeSuggestions('''
|
|
||||||
lib B;
|
|
||||||
import 'a.dart';
|
|
||||||
class A with ^
|
|
||||||
''');
|
|
||||||
|
|
||||||
if (isProtocolVersion1) {
|
|
||||||
assertResponse('''
|
|
||||||
suggestions
|
|
||||||
Foo
|
|
||||||
kind: mixin
|
|
||||||
''');
|
|
||||||
} else {
|
|
||||||
assertResponse('''
|
|
||||||
suggestions
|
|
||||||
''');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> test_mixinClass_inside() async {
|
|
||||||
await computeSuggestions('''
|
await computeSuggestions('''
|
||||||
base mixin class FooBaseMixinClass {}
|
base mixin class FooBaseMixinClass {}
|
||||||
mixin class FooMixinClass {}
|
mixin class FooMixinClass {}
|
||||||
|
@ -209,7 +137,7 @@ suggestions
|
||||||
''');
|
''');
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> test_mixinClass_outside() async {
|
Future<void> test_mixinClass_base_outside() async {
|
||||||
newFile('$testPackageLibPath/a.dart', '''
|
newFile('$testPackageLibPath/a.dart', '''
|
||||||
base mixin class FooBaseMixinClass {}
|
base mixin class FooBaseMixinClass {}
|
||||||
mixin class FooMixinClass {}
|
mixin class FooMixinClass {}
|
||||||
|
|
|
@ -375,10 +375,7 @@ mixin D on B implements A, C {
|
||||||
class A {}
|
class A {}
|
||||||
final class B implements A {}
|
final class B implements A {}
|
||||||
''');
|
''');
|
||||||
await assertHasAssistAt('B', '''
|
await assertNoAssistAt('B');
|
||||||
class A {}
|
|
||||||
final mixin B implements A {}
|
|
||||||
''');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> test_implements() async {
|
Future<void> test_implements() async {
|
||||||
|
@ -422,10 +419,7 @@ mixin A {}
|
||||||
class A {}
|
class A {}
|
||||||
sealed class B extends A {}
|
sealed class B extends A {}
|
||||||
''');
|
''');
|
||||||
await assertHasAssistAt('B', '''
|
await assertNoAssistAt('B');
|
||||||
class A {}
|
|
||||||
sealed mixin B implements A {}
|
|
||||||
''');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> test_sealed_extendsWith_super_extends() async {
|
Future<void> test_sealed_extendsWith_super_extends() async {
|
||||||
|
@ -442,19 +436,7 @@ sealed class C extends A with B {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
''');
|
''');
|
||||||
await assertHasAssistAt('C', '''
|
await assertNoAssistAt('C');
|
||||||
class A {
|
|
||||||
a() {}
|
|
||||||
}
|
|
||||||
mixin class B {
|
|
||||||
b() {}
|
|
||||||
}
|
|
||||||
sealed mixin C on A implements B {
|
|
||||||
c() {
|
|
||||||
super.a();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
''');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> test_typeParameters() async {
|
Future<void> test_typeParameters() async {
|
||||||
|
|
|
@ -602,100 +602,6 @@ class SubSubclass extends SealedSubclass {}
|
||||||
newFileContent: newFileContent);
|
newFileContent: newFileContent);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> test_sealedMixin_implements() async {
|
|
||||||
var originalSource = '''
|
|
||||||
sealed mixin [!Either!] {}
|
|
||||||
|
|
||||||
class Left implements Either {}
|
|
||||||
mixin Right implements Either {}
|
|
||||||
|
|
||||||
class Neither {}
|
|
||||||
''';
|
|
||||||
var modifiedSource = '''
|
|
||||||
|
|
||||||
class Neither {}
|
|
||||||
''';
|
|
||||||
var newFileName = 'either.dart';
|
|
||||||
var newFileContent = '''
|
|
||||||
sealed mixin Either {}
|
|
||||||
|
|
||||||
class Left implements Either {}
|
|
||||||
mixin Right implements Either {}
|
|
||||||
''';
|
|
||||||
await _multipleDeclarations(
|
|
||||||
originalSource: originalSource,
|
|
||||||
modifiedSource: modifiedSource,
|
|
||||||
count: 3,
|
|
||||||
newFileName: newFileName,
|
|
||||||
newFileContent: newFileContent);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> test_sealedMixin_on_subclass() async {
|
|
||||||
addTestSource('''
|
|
||||||
sealed mixin SealedMixin {}
|
|
||||||
|
|
||||||
mixin [!OtherMixin!] on SealedMixin {}
|
|
||||||
''');
|
|
||||||
await initializeServer();
|
|
||||||
await expectNoCodeAction(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> test_sealedMixin_on_superclass() async {
|
|
||||||
var originalSource = '''
|
|
||||||
sealed mixin [!SealedMixin!] {}
|
|
||||||
|
|
||||||
mixin MixinToMove on SealedMixin {}
|
|
||||||
|
|
||||||
mixin MixinToStay on MixinToMove {}
|
|
||||||
''';
|
|
||||||
var modifiedSource = '''
|
|
||||||
import 'package:test/sealed_mixin.dart';
|
|
||||||
|
|
||||||
|
|
||||||
mixin MixinToStay on MixinToMove {}
|
|
||||||
''';
|
|
||||||
var newFileName = 'sealed_mixin.dart';
|
|
||||||
var newFileContent = '''
|
|
||||||
sealed mixin SealedMixin {}
|
|
||||||
|
|
||||||
mixin MixinToMove on SealedMixin {}
|
|
||||||
''';
|
|
||||||
await _multipleDeclarations(
|
|
||||||
originalSource: originalSource,
|
|
||||||
modifiedSource: modifiedSource,
|
|
||||||
count: 2,
|
|
||||||
newFileName: newFileName,
|
|
||||||
newFileContent: newFileContent);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> test_sealedMixin_with() async {
|
|
||||||
var originalSource = '''
|
|
||||||
sealed mixin [!Either!] {}
|
|
||||||
|
|
||||||
class Left with Either {}
|
|
||||||
class Right with Either {}
|
|
||||||
|
|
||||||
class Neither {}
|
|
||||||
''';
|
|
||||||
var modifiedSource = '''
|
|
||||||
|
|
||||||
class Neither {}
|
|
||||||
''';
|
|
||||||
var newFileName = 'either.dart';
|
|
||||||
var newFileContent = '''
|
|
||||||
sealed mixin Either {}
|
|
||||||
|
|
||||||
class Left with Either {}
|
|
||||||
class Right with Either {}
|
|
||||||
''';
|
|
||||||
await _multipleDeclarations(
|
|
||||||
originalSource: originalSource,
|
|
||||||
modifiedSource: modifiedSource,
|
|
||||||
count: 3,
|
|
||||||
newFileName: newFileName,
|
|
||||||
newFileContent: newFileContent);
|
|
||||||
}
|
|
||||||
|
|
||||||
Future<void> test_single_class_withTypeParameters() async {
|
Future<void> test_single_class_withTypeParameters() async {
|
||||||
var originalSource = '''
|
var originalSource = '''
|
||||||
class A {}
|
class A {}
|
||||||
|
|
Loading…
Reference in a new issue