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

Unified Diff: pkg/compiler/lib/src/compile_time_constants.dart

Issue 2941763002: More strong mode cleaning in dart2js. (Closed)
Patch Set: Created 3 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 | pkg/compiler/lib/src/dart2js_resolver.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compile_time_constants.dart
diff --git a/pkg/compiler/lib/src/compile_time_constants.dart b/pkg/compiler/lib/src/compile_time_constants.dart
index 02576e09e63bb4c136a049b0d1aa5246b78682e1..2b56fd7b14cbb441ae693f020d0dfd9ca03b55bc 100644
--- a/pkg/compiler/lib/src/compile_time_constants.dart
+++ b/pkg/compiler/lib/src/compile_time_constants.dart
@@ -999,7 +999,7 @@ class CompileTimeConstantEvaluator extends Visitor<AstConstant> {
CallStructure callStructure,
List<AstConstant> normalizedArguments,
List<AstConstant> concreteArguments) {
- var firstArgument = normalizedArguments[0].value;
+ dynamic firstArgument = normalizedArguments[0].value;
Emily Fortuna 2017/06/14 17:24:23 can we type this ConstantValue instead of dynamic?
ahe 2017/06/14 18:38:24 It's assumed to be StringSomething further down.
ConstantValue defaultValue = normalizedArguments[1].value;
if (firstArgument.isNull) {
@@ -1239,7 +1239,8 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
// Assign arguments to parameters.
FunctionSignature signature = constructor.functionSignature;
int index = 0;
- signature.orderedForEachParameter((ParameterElement parameter) {
+ signature.orderedForEachParameter((_parameter) {
+ ParameterElement parameter = _parameter;
AstConstant argument = arguments[index++];
Node node = parameter.node;
if (parameter.isInitializingFormal) {
@@ -1265,7 +1266,8 @@ class ConstructorEvaluator extends CompileTimeConstantEvaluator {
Map<FieldEntity, ConstantExpression> fields =
expression.computeInstanceFields(new _CompilerEnvironment(compiler));
- fields.forEach((FieldElement field, ConstantExpression expression) {
+ fields.forEach((_field, ConstantExpression expression) {
+ FieldElement field = _field;
ConstantValue value = expression.evaluate(
new _CompilerEnvironment(compiler), constantSystem);
fieldValues[field] = new AstConstant(context, null, expression, value);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dart2js_resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698