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

Unified Diff: compiler/java/com/google/dart/compiler/backend/js/JsNameProvider.java

Issue 8845002: Function type checking: Part Deux (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Nits checked Created 9 years 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: compiler/java/com/google/dart/compiler/backend/js/JsNameProvider.java
diff --git a/compiler/java/com/google/dart/compiler/backend/js/JsNameProvider.java b/compiler/java/com/google/dart/compiler/backend/js/JsNameProvider.java
index 8857ee978e02ca58915b50ee0bb746e9cc339bc2..d8469e206305b5fb8241b764524ea253ad91ac8d 100644
--- a/compiler/java/com/google/dart/compiler/backend/js/JsNameProvider.java
+++ b/compiler/java/com/google/dart/compiler/backend/js/JsNameProvider.java
@@ -62,8 +62,9 @@ class JsNameProvider {
return jsName;
}
assert ElementKind.of(symbol).equals(ElementKind.CLASS)
- : "Only classes can be lazily declared. Undeclared: "
- + symbol.getOriginalSymbolName();
+ || ElementKind.of(symbol).equals(ElementKind.FUNCTION_TYPE_ALIAS)
+ : "Only classes or typedefs can be lazily declared. Undeclared: "
+ + symbol.getOriginalSymbolName();
ClassElement classElement = (ClassElement) symbol;
String name = classElement.getName();
String nativeName = classElement.getNativeName();

Powered by Google App Engine
This is Rietveld 408576698