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

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

Issue 1309243007: Stop propagating return types for top-level function declarations (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Added test of function expression propagation Created 5 years, 3 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/incremental_resolver_test.dart
diff --git a/pkg/analyzer/test/generated/incremental_resolver_test.dart b/pkg/analyzer/test/generated/incremental_resolver_test.dart
index a08ede73fdfbb34980e10984346cb78f5b00521e..ccb5af4ce0e7d091999c58d4bbc1a75d671c965c 100644
--- a/pkg/analyzer/test/generated/incremental_resolver_test.dart
+++ b/pkg/analyzer/test/generated/incremental_resolver_test.dart
@@ -2346,6 +2346,41 @@ class A {
''');
}
+ void test_true_functionExpression() {
+ _assertMatches(r'''
+import 'dart:async';
+
+class A {
+ Future<int> mmm() async {
+ return 42;
+ }
+
+ a() {
+ mmm().then((p1) {
+ return p1.toString();
+ }).then((p2) {
+ print(p2);
+ });
+ }
+}
+''', r'''import 'dart:async';
+
+class A {
+ Future<int> mmm() async {
+ return 42;
+ }
+
+ a() {
+ mmm().then((int p1) {
+ return p1.toString();
+ }).then((String p2) {
+ print(p2);
+ });
+ }
+}
+''');
+ }
+
void test_true_functionTypeAlias_list_reorder() {
_assertMatches(
r'''
« no previous file with comments | « pkg/analyzer/lib/src/generated/static_type_analyzer.dart ('k') | pkg/analyzer/test/generated/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698