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

Unified Diff: pkg/analyzer/lib/src/dart/element/element.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 | « no previous file | pkg/analyzer/test/src/dart/element/element_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index d00ab5799dd8c61e492753b216339c22fcb0a550..c91582c6790c254570da2683ba442e3a558513fd 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -679,9 +679,12 @@ class ClassElementImpl extends ElementImpl implements ClassElement {
visitedClasses.add(this);
}
try {
- ClassElementImpl superclass = supertype.element;
- constructorsToForward =
- superclass._computeMixinAppConstructors(visitedClasses);
+ ClassElement superclass = supertype.element;
+ if (superclass is ClassElementHandle) {
+ superclass = (superclass as ClassElementHandle).actualElement;
+ }
+ constructorsToForward = (superclass as ClassElementImpl)
+ ._computeMixinAppConstructors(visitedClasses);
} finally {
visitedClasses.removeLast();
}
« no previous file with comments | « no previous file | pkg/analyzer/test/src/dart/element/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698