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

Unified Diff: lib/compiler/implementation/typechecker.dart

Issue 10829379: Add erroneous elements for function types and use them to allow unresolvable constructors to be han… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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: lib/compiler/implementation/typechecker.dart
diff --git a/lib/compiler/implementation/typechecker.dart b/lib/compiler/implementation/typechecker.dart
index aa6891976f43dcf3c4b610b6a68172a6a3a6b6b5..c28e2e631f1b5f9c207b488f07ef157f0e6c0cbd 100644
--- a/lib/compiler/implementation/typechecker.dart
+++ b/lib/compiler/implementation/typechecker.dart
@@ -335,6 +335,7 @@ class TypeCheckerVisitor implements Visitor<Type> {
Type returnType;
Type previousType;
final FunctionElement element = elements[node];
+ if (Element.isInvalid(element)) return types.dynamicType;
if (element.kind === ElementKind.GENERATIVE_CONSTRUCTOR ||
element.kind === ElementKind.GENERATIVE_CONSTRUCTOR_BODY) {
type = types.dynamicType;
@@ -647,7 +648,7 @@ class TypeCheckerVisitor implements Visitor<Type> {
}
Type computeType(Element element) {
- if (element === null) return types.dynamicType;
+ if (Element.isInvalid(element)) return types.dynamicType;
Type result = element.computeType(compiler);
return (result !== null) ? result : types.dynamicType;
}
« lib/compiler/implementation/ssa/builder.dart ('K') | « lib/compiler/implementation/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698