Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1729)

Unified Diff: pkg/analyzer/test/src/dart/element/element_test.dart

Issue 1815253002: Fix another unguarded cast to an impl class (issue 26034, case 2) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/dart/element/element_test.dart
diff --git a/pkg/analyzer/test/src/dart/element/element_test.dart b/pkg/analyzer/test/src/dart/element/element_test.dart
index b93ba35a0d59bfe3751af6b05a862c3a27d47730..17f71cceccbc9fb38e6ed1a50574fde68cdae879 100644
--- a/pkg/analyzer/test/src/dart/element/element_test.dart
+++ b/pkg/analyzer/test/src/dart/element/element_test.dart
@@ -120,6 +120,24 @@ abstract class A<K, V> = Object with MapMixin<K, V>;
}
}
+ void test_constructors_mixinApplicationWithHandle() {
+ AnalysisContext context = createAnalysisContext();
+ context.sourceFactory = new SourceFactory([]);
+
+ ElementLocation location = new ElementLocationImpl.con2('');
+ ClassElementImpl classA = ElementFactory.classElement2("A");
+ classA.mixinApplication = true;
+ TestElementResynthesizer resynthesizer =
+ new TestElementResynthesizer(context, {location: classA});
+ ClassElementHandle classAHandle =
+ new ClassElementHandle(resynthesizer, location);
+ ClassElementImpl classB =
+ ElementFactory.classElement("B", new InterfaceTypeImpl(classAHandle));
+ classB.mixinApplication = true;
+
+ expect(classB.constructors, hasLength(1));
+ }
+
void test_getAllSupertypes_interface() {
ClassElement classA = ElementFactory.classElement2("A");
ClassElement classB = ElementFactory.classElement("B", classA.type);
« no previous file with comments | « pkg/analyzer/lib/src/dart/element/element.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698