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

Unified Diff: pkg/analyzer/test/generated/compile_time_error_code_test.dart

Issue 2654663005: Add DeclaredVariables to AnalysisDriver. (Closed)
Patch Set: Created 3 years, 11 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/analyzer/test/generated/compile_time_error_code_test.dart
diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
index b398334f2c3737d248df509d998799c58e0de01f..00f34dda85dec5e4e7d477fb574d9d349db72a86 100644
--- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
+++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
@@ -2426,7 +2426,11 @@ var b2 = const bool.fromEnvironment('x', defaultValue: 1);''');
test_fromEnvironment_bool_badDefault_whenDefined() async {
// The type of the defaultValue needs to be correct even when the default
// value isn't used (because the variable is defined in the environment).
- analysisContext2.declaredVariables.define("x", "true");
+ if (enableNewAnalysisDriver) {
+ driver.declaredVariables.define("x", "true");
+ } else {
+ analysisContext2.declaredVariables.define("x", "true");
+ }
Source source =
addSource("var b = const bool.fromEnvironment('x', defaultValue: 1);");
await computeAnalysisResult(source);

Powered by Google App Engine
This is Rietveld 408576698