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

Unified Diff: tests/language/function_subtype_local5_test.dart

Issue 17413013: Revert "Support runtime check of function types." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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 | « tests/language/function_subtype_local4_test.dart ('k') | tests/language/function_subtype_named1_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/function_subtype_local5_test.dart
diff --git a/tests/language/function_subtype_local5_test.dart b/tests/language/function_subtype_local5_test.dart
deleted file mode 100644
index 05cc7afa1431be504dc25da878c88e6ab8d21abd..0000000000000000000000000000000000000000
--- a/tests/language/function_subtype_local5_test.dart
+++ /dev/null
@@ -1,42 +0,0 @@
-// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-// Dart test program for constructors and initializers.
-
-// Check function subtyping for local functions on generic type against generic
-// typedefs.
-
-import 'package:expect/expect.dart';
-
-typedef int Foo<T>(T a, [String b]);
-typedef int Bar<T>(T a, [String b]);
-typedef int Baz<T>(T a, {String b});
-typedef int Boz<T>(T a);
-typedef int Biz<T>(T a, int b);
-
-class C<T> {
- void test(String nameOfT, bool expectedResult) {
- int foo(bool a, [String b]) => null;
- int baz(bool a, {String b}) => null;
-
- Expect.equals(expectedResult, foo is Foo<T>, 'foo is Foo<$nameOfT>');
- Expect.equals(expectedResult, foo is Bar<T>, 'foo is Bar<$nameOfT>');
- Expect.isFalse(foo is Baz<T>, 'foo is Baz<$nameOfT>');
- Expect.equals(expectedResult, foo is Boz<T>, 'foo is Boz<$nameOfT>');
- Expect.isFalse(foo is Biz<T>, 'foo is Biz<$nameOfT>');
-
- Expect.isFalse(baz is Foo<T>, 'baz is Foo<$nameOfT>');
- Expect.isFalse(baz is Bar<T>, 'baz is Bar<$nameOfT>');
- Expect.equals(expectedResult, baz is Baz<T>, 'baz is Baz<$nameOfT>');
- Expect.equals(expectedResult, baz is Boz<T>, 'baz is Boz<$nameOfT>');
- Expect.isFalse(baz is Biz<T>, 'bar is Biz<$nameOfT>');
- }
-}
-
-class D<S,T> extends C<T> {}
-
-main() {
- new D<String, bool>().test('bool', true);
- new D<bool, int>().test('int', false);
- new D().test('dynamic', true);
-}
« no previous file with comments | « tests/language/function_subtype_local4_test.dart ('k') | tests/language/function_subtype_named1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698