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

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

Issue 10662054: Cover some more cases. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/unparse_validator.dart
diff --git a/lib/compiler/implementation/unparse_validator.dart b/lib/compiler/implementation/unparse_validator.dart
index f43024678c2ea99bf3a394cc725cb78277168909..1e0193609cf12bd01a7b4f5260a4cc7f647d6268 100644
--- a/lib/compiler/implementation/unparse_validator.dart
+++ b/lib/compiler/implementation/unparse_validator.dart
@@ -71,12 +71,14 @@ class UnparseValidator extends CompilerTask {
assert(element is FunctionElement);
// Generative constructors parse to very special function expressions.
// Handle them when classes are properly handled.
- } else if (element.isField()) {
- assert(element is VariableElement);
+ } else if (element.isField() || element is AbstractFieldElement) {
+ assert(element is VariableElement || element is AbstractFieldElement);
// Fields are just names with possible initialization expressions.
// Nothing to care about for now.
+ } else if (element is VoidElement) {
+ // Nothing to do here.
} else {
- compiler.cancel('Cannot handle $element', element: element);
+ compiler.cancel('Cannot handle $element');
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698