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

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: address comments Created 5 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
« no previous file with comments | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 008b709a179658883843f7942e7eae557fd57ab0..9bc3a86a016844cac6a1af67a8ce47a0c5c94fdb 100644
--- a/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_handler_javascript.dart
@@ -44,6 +44,7 @@ class JavaScriptConstantTask extends ConstantCompilerTask {
@override
ConstantExpression compileConstant(VariableElement element) {
return measure(() {
+ // TODO(het): Only report errors from one of the constant compilers
ConstantExpression result = dartConstantCompiler.compileConstant(element);
jsConstantCompiler.compileConstant(element);
return result;
@@ -126,12 +127,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);
}
« no previous file with comments | « pkg/compiler/lib/src/compile_time_constants.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698