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

Unified Diff: pkg/dev_compiler/lib/src/compiler/code_generator.dart

Issue 2684303002: Use computeConstantValue instead of constantValue (Closed)
Patch Set: Created 3 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 | « no previous file | pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dev_compiler/lib/src/compiler/code_generator.dart
diff --git a/pkg/dev_compiler/lib/src/compiler/code_generator.dart b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
index 76292e44a0094bd56c23647772c75b82cc9d4bb2..a23e3e3231364ffa597584c29138e42fff158429 100644
--- a/pkg/dev_compiler/lib/src/compiler/code_generator.dart
+++ b/pkg/dev_compiler/lib/src/compiler/code_generator.dart
@@ -4448,7 +4448,7 @@ class CodeGenerator extends GeneralizingAstVisitor
Element staticElement = identifier.staticElement;
if (staticElement is PropertyAccessorElement && staticElement.isGetter) {
PropertyInducingElement variable = staticElement.variable;
- int value = variable?.constantValue?.toIntValue();
+ int value = variable?.computeConstantValue()?.toIntValue();
if (value != null && value >= low && value <= high) return value;
}
return null;
« no previous file with comments | « no previous file | pkg/dev_compiler/lib/src/compiler/nullable_type_inference.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698