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

Unified Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 132313012: Fix typechecks for constant assignments of function to typedefs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update status file for analyzer. Created 6 years, 10 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 | « sdk/lib/_internal/compiler/implementation/constants.dart ('k') | tests/language/language.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index 36ddfa55cd3ca54374ce24368dfc1ac24e4d4d9a..ba4c74f52806cf18ecee83cd65e0922140582f5a 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -666,7 +666,9 @@ class JavaScriptBackend extends Backend {
void registerInstantiatedConstantType(DartType type, TreeElements elements) {
Enqueuer enqueuer = compiler.enqueuer.codegen;
- enqueuer.registerInstantiatedType(type, elements);
+ DartType instantiatedType =
+ type.kind == TypeKind.FUNCTION ? compiler.functionClass.rawType : type;
+ enqueuer.registerInstantiatedType(instantiatedType, elements);
if (type is InterfaceType && !type.treatAsRaw &&
classNeedsRti(type.element)) {
enqueuer.registerStaticUse(getSetRuntimeTypeInfo());
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/constants.dart ('k') | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698