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

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

Issue 2226903003: fix #26812, function types should support the call method (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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/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 e7d7de055ed1ccee032683a750390178711e3253..591404044b649aaee6d77abf0e7a44eaa441e293 100644
--- a/pkg/analyzer/test/src/task/strong/checker_test.dart
+++ b/pkg/analyzer/test/src/task/strong/checker_test.dart
@@ -113,6 +113,15 @@ test() {
''');
}
+ void test_callMethodOnFunctions() {
+ checkFile(r'''
+void f(int x) => print(x);
+main() {
+ f.call(/*error:ARGUMENT_TYPE_NOT_ASSIGNABLE*/'hi');
+}
+ ''');
+ }
+
void test_castsInConditions() {
checkFile('''
main() {

Powered by Google App Engine
This is Rietveld 408576698