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

Unified Diff: pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart

Issue 1182663008: Typecheck const classes in the context of the constructor call. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
Index: pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
diff --git a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
index 57ae567823919c696797cb2cd53fdff523ff4560..783a19b8b82dabf6be3951452563e69711891f03 100644
--- a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
@@ -118,12 +118,13 @@ class JavaScriptConstantCompiler extends ConstantCompilerBase
ConstantExpression compileVariableWithDefinitions(VariableElement element,
TreeElements definitions,
- {bool isConst: false}) {
+ {bool isConst: false,
+ bool checkType: true}) {
if (!isConst && lazyStatics.contains(element)) {
return null;
}
ConstantExpression value = super.compileVariableWithDefinitions(
- element, definitions, isConst: isConst);
+ element, definitions, isConst: isConst, checkType: checkType);
if (!isConst && value == null) {
lazyStatics.add(element);
}

Powered by Google App Engine
This is Rietveld 408576698