Index: pkg/analyzer/test/src/task/strong/checker_test.dart |
diff --git a/pkg/analyzer/test/src/task/strong/checker_test.dart b/pkg/analyzer/test/src/task/strong/checker_test.dart |
index 43336713ecc174c0b6c2aec833c431854ca54ad0..e7d7de055ed1ccee032683a750390178711e3253 100644 |
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart |
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart |
@@ -2977,6 +2977,16 @@ main() { |
'''); |
} |
+ void test_optionalParams() { |
+ // Regression test for https://github.com/dart-lang/sdk/issues/26155 |
+ checkFile(r''' |
+void takesF(void f(int x)) { |
+ takesF(/*info:INFERRED_TYPE_CLOSURE,info:INFERRED_TYPE_CLOSURE*/([x]) { bool z = x.isEven; }); |
+ takesF(/*info:INFERRED_TYPE_CLOSURE*/(y) { bool z = y.isEven; }); |
+} |
+ '''); |
+ } |
+ |
void test_privateOverride() { |
addFile( |
''' |