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

Unified Diff: pkg/analyzer/test/src/task/strong/checker_test.dart

Issue 2675963004: fix #28630, instance method tear-offs are treated as strict arrows (Closed)
Patch Set: fix sdk Created 3 years, 10 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
« no previous file with comments | « pkg/analyzer/lib/src/task/strong/checker.dart ('k') | pkg/dev_compiler/tool/sdk_expected_errors.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 73fc16c5d48b058ac12fa345a192ac27da6a7e59..adb61e5b1ba48cbf2aa1e1d130964180ff4961dd 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -3678,6 +3678,33 @@ class B extends A {
''');
}
+ void test_tearOffTreatedConsistentlyAsStrictArrow() {
+ checkFile(r'''
+void foo(void f(String x)) {}
+
+class A {
+ Null bar1(dynamic x) => null;
+ void bar2(dynamic x) => null;
+ Null bar3(String x) => null;
+ void test() {
+ foo(bar1);
+ foo(bar2);
+ foo(bar3);
+ }
+}
+
+
+Null baz1(dynamic x) => null;
+void baz2(dynamic x) => null;
+Null baz3(String x) => null;
+void test() {
+ foo(baz1);
+ foo(baz2);
+ foo(baz3);
+}
+ ''');
+ }
+
void test_ternaryOperator() {
checkFile('''
abstract class Comparable<T> {
« no previous file with comments | « pkg/analyzer/lib/src/task/strong/checker.dart ('k') | pkg/dev_compiler/tool/sdk_expected_errors.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698