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

Unified Diff: tests/language_strong/function_subtype3_test.dart

Issue 2995813002: fix #30423, covariant parameter tearoff type should be Object (Closed)
Patch Set: Created 3 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: tests/language_strong/function_subtype3_test.dart
diff --git a/tests/language_strong/function_subtype3_test.dart b/tests/language_strong/function_subtype3_test.dart
index 7b2acc30bdd8f678c87af2e413047473a9cd2265..b2190d691822e948b6fa021176bd1c46cdd49a68 100644
--- a/tests/language_strong/function_subtype3_test.dart
+++ b/tests/language_strong/function_subtype3_test.dart
@@ -5,7 +5,7 @@
import 'package:expect/expect.dart';
class FunctionLike<T> {
- call(T arg) {
+ T call(T arg) {
return arg;
}
}
@@ -15,12 +15,12 @@ class Foo<T> {
testInt() => new FunctionLike<int>() is T;
}
-typedef TakeString(String arg);
-typedef TakeInt(int arg);
+typedef String ReturnString(Object arg);
+typedef int ReturnInt(Object arg);
main() {
- Foo<TakeString> stringFoo = new Foo<TakeString>();
- Foo<TakeInt> intFoo = new Foo<TakeInt>();
+ var stringFoo = new Foo<ReturnString>();
+ var intFoo = new Foo<ReturnInt>();
Expect.isTrue(stringFoo.testString());
Expect.isFalse(stringFoo.testInt());

Powered by Google App Engine
This is Rietveld 408576698