Index: pkg/analyzer/test/src/dart/analysis/driver_test.dart |
diff --git a/pkg/analyzer/test/src/dart/analysis/driver_test.dart b/pkg/analyzer/test/src/dart/analysis/driver_test.dart |
index b488b30031e043b08a9934689a7d23287887f750..8793f1c5cafb83fe70f8a31bfd25320232b894db 100644 |
--- a/pkg/analyzer/test/src/dart/analysis/driver_test.dart |
+++ b/pkg/analyzer/test/src/dart/analysis/driver_test.dart |
@@ -401,6 +401,27 @@ var A2 = B1; |
expect(allResults, [result]); |
} |
+ test_getResult_constants_defaultParameterValue_localFunction() async { |
+ var a = _p('/test/bin/a.dart'); |
+ var b = _p('/test/bin/b.dart'); |
+ provider.newFile(a, 'const C = 42;'); |
+ provider.newFile( |
+ b, |
+ r''' |
+import 'a.dart'; |
+main() { |
+ foo({int p: C}) {} |
+ foo(); |
+} |
+'''); |
+ driver.addFile(a); |
+ driver.addFile(b); |
+ await _waitForIdle(); |
+ |
+ AnalysisResult result = await driver.getResult(b); |
+ expect(result.errors, isEmpty); |
+ } |
+ |
test_getResult_errors() async { |
String content = 'main() { int vv; }'; |
_addTestFile(content, priority: true); |