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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_test.dart

Issue 1950333003: Fix a corner case of inferred types with function-typed parameters. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Also test resynthesis. Created 4 years, 7 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/src/summary/resynthesize_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
index 1c2c239988b9647a6194d761318c1953419c9e6b..fb9795f28ceb172034644b09e445a9ee6a3a31b6 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -3357,6 +3357,20 @@ var v = h(/*info:INFERRED_TYPE_CLOSURE*/(y) {});
' abstract class D { void f(int x, int g(String s)); }');
}
+ test_inferred_type_refers_to_nested_function_typed_param_of_typedef() {
scheglov 2016/05/06 16:49:43 Is it really "of typedef"?
Paul Berry 2016/05/06 16:54:37 Oops. No, it's not. Fixed.
+ checkLibrary('''
+f(void g(int x, void h())) => null;
+var v = f((x, y) {});
+''');
+ }
+
+ test_inferred_type_refers_to_nested_function_typed_param_of_typedef_named() {
+ checkLibrary('''
+f({void g(int x, void h())}) => null;
+var v = f(g: (x, y) {});
+''');
+ }
+
test_inferred_type_refers_to_setter_function_typed_parameter_type() {
checkLibrary('class C extends D { void set f(g) {} }'
' abstract class D { void set f(int g(String s)); }');
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | pkg/analyzer/test/src/summary/summarize_ast_strong_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698