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

Unified Diff: dart/pkg/compiler/lib/src/typechecker.dart

Issue 821593004: Create erroneous element when resolution of initializer fails. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Tests passing locally. Created 5 years, 11 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
Index: dart/pkg/compiler/lib/src/typechecker.dart
diff --git a/dart/pkg/compiler/lib/src/typechecker.dart b/dart/pkg/compiler/lib/src/typechecker.dart
index 2243375dcd4c3fba695d7ee905ff5f6961418549..61dbd7d486809c82f62669dfc07f60aa63c52f60 100644
--- a/dart/pkg/compiler/lib/src/typechecker.dart
+++ b/dart/pkg/compiler/lib/src/typechecker.dart
@@ -254,8 +254,8 @@ class TypeCheckerVisitor extends Visitor<DartType> {
final ClassElement currentClass;
- InterfaceType thisType;
- InterfaceType superType;
+ DartType thisType;
+ DartType superType;
Link<DartType> cascadeTypes = const Link<DartType>();
@@ -339,6 +339,10 @@ class TypeCheckerVisitor extends Visitor<DartType> {
if (currentClass != null) {
thisType = currentClass.thisType;
superType = currentClass.supertype;
+ } else {
+ // If these are used, an error should have been reported by the resolver.
+ thisType = const DynamicType();
+ superType = const DynamicType();
}
}
« no previous file with comments | « dart/pkg/compiler/lib/src/resolution/resolution.dart ('k') | dart/tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698