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

Unified Diff: pkg/analyzer/test/src/dart/analysis/driver_test.dart

Issue 2489133002: Set initializer expressions for default values of parameters of local functions. (Closed)
Patch Set: Created 4 years, 1 month 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 | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « pkg/analyzer/lib/src/generated/resolver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698