Index: pkg/analyzer/test/src/dart/analysis/index_test.dart |
diff --git a/pkg/analyzer/test/src/dart/analysis/index_test.dart b/pkg/analyzer/test/src/dart/analysis/index_test.dart |
index 1ab740d1d10bb84af570dbeac5619d8cf2e237a5..4c21bd138ed619e4e2a7c4282a188dbe2cbbffc3 100644 |
--- a/pkg/analyzer/test/src/dart/analysis/index_test.dart |
+++ b/pkg/analyzer/test/src/dart/analysis/index_test.dart |
@@ -916,7 +916,7 @@ class A { |
..isWrittenAt('field = 5', true); |
} |
- test_subtypes() async { |
+ test_subtypes_classDeclaration() async { |
String libP = 'package:test/lib.dart;package:test/lib.dart'; |
provider.newFile( |
_p('$testProject/lib.dart'), |
@@ -975,6 +975,38 @@ class Z implements E, D { |
} |
} |
+ test_subtypes_classTypeAlias() async { |
+ String libP = 'package:test/lib.dart;package:test/lib.dart'; |
+ provider.newFile( |
+ _p('$testProject/lib.dart'), |
+ ''' |
+class A {} |
+class B {} |
+class C {} |
+class D {} |
+'''); |
+ await _indexTestUnit(''' |
+import 'lib.dart'; |
+ |
+class X = A with B, C; |
+class Y = A with B implements C, D; |
+'''); |
+ |
+ { |
+ AnalysisDriverSubtype X = |
+ index.subtypes.singleWhere((t) => t.name == 'X'); |
+ expect(X.supertypes, ['$libP;A', '$libP;B', '$libP;C']); |
+ expect(X.members, isEmpty); |
+ } |
+ |
+ { |
+ AnalysisDriverSubtype Y = |
+ index.subtypes.singleWhere((t) => t.name == 'Y'); |
+ expect(Y.supertypes, ['$libP;A', '$libP;B', '$libP;C', '$libP;D']); |
+ expect(Y.members, isEmpty); |
+ } |
+ } |
+ |
test_subtypes_dynamic() async { |
await _indexTestUnit(''' |
class X extends dynamic { |