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

Unified Diff: pkg/analyzer/lib/src/dart/constant/evaluation.dart

Issue 2947443002: Using identical(xxx, typeProvider.yyy) is not compatible with Analysis Driver. (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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/constant/evaluation.dart
diff --git a/pkg/analyzer/lib/src/dart/constant/evaluation.dart b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
index 58b3e7b159dd05a6d020ed48aca542b8e88134f3..a9b5a8bda18f97c4ebcc906dea07e6f3578adb03 100644
--- a/pkg/analyzer/lib/src/dart/constant/evaluation.dart
+++ b/pkg/analyzer/lib/src/dart/constant/evaluation.dart
@@ -475,7 +475,7 @@ class ConstantEvaluationEngine {
}
String variableName =
argumentCount < 1 ? null : argumentValues[0].toStringValue();
- if (identical(definingClass, typeProvider.boolType)) {
+ if (definingClass == typeProvider.boolType) {
DartObject valueFromEnvironment;
valueFromEnvironment =
_declaredVariables.getBool(typeProvider, variableName);
@@ -483,7 +483,7 @@ class ConstantEvaluationEngine {
valueFromEnvironment,
new DartObjectImpl(typeProvider.boolType, BoolState.FALSE_STATE),
namedArgumentValues);
- } else if (identical(definingClass, typeProvider.intType)) {
+ } else if (definingClass == typeProvider.intType) {
DartObject valueFromEnvironment;
valueFromEnvironment =
_declaredVariables.getInt(typeProvider, variableName);
@@ -491,7 +491,7 @@ class ConstantEvaluationEngine {
valueFromEnvironment,
new DartObjectImpl(typeProvider.nullType, NullState.NULL_STATE),
namedArgumentValues);
- } else if (identical(definingClass, typeProvider.stringType)) {
+ } else if (definingClass == typeProvider.stringType) {
DartObject valueFromEnvironment;
valueFromEnvironment =
_declaredVariables.getString(typeProvider, variableName);
@@ -501,7 +501,7 @@ class ConstantEvaluationEngine {
namedArgumentValues);
}
} else if (constructor.name == "" &&
- identical(definingClass, typeProvider.symbolType) &&
+ definingClass == typeProvider.symbolType &&
argumentCount == 1) {
if (!checkSymbolArguments(
arguments, argumentValues, namedArgumentValues)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698