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

Unified Diff: pkg/kernel/testcases/input/covariant_generic.dart

Issue 2825063002: Move kernel baseline tests to front_end. (Closed)
Patch Set: Created 3 years, 8 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/kernel/testcases/input/closure.dart ('k') | pkg/kernel/testcases/input/escape.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/testcases/input/covariant_generic.dart
diff --git a/pkg/kernel/testcases/input/covariant_generic.dart b/pkg/kernel/testcases/input/covariant_generic.dart
deleted file mode 100644
index a0234a681ce5d20e6a1c99f836c35cb12cce921a..0000000000000000000000000000000000000000
--- a/pkg/kernel/testcases/input/covariant_generic.dart
+++ /dev/null
@@ -1,45 +0,0 @@
-// Copyright (c) 2016, 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.
-typedef void Callback<T>(T x);
-
-class Foo<T> {
- final T finalField;
- final Callback<T> callbackField;
-
- T mutableField;
- Callback<T> mutableCallbackField;
-
- Foo(this.finalField, this.callbackField);
-
- void method(T x) {}
-
- set setter(T x) {}
-
- void withCallback(Callback<T> callback) {
- callback(finalField);
- }
-}
-
-main() {
- Foo<int> fooInt = new Foo<int>(1, (int x) {});
-
- fooInt.method(3);
- fooInt.setter = 3;
- fooInt.withCallback((int x) {});
- fooInt.withCallback((num x) {});
- fooInt.mutableField = 3;
- fooInt.mutableCallbackField = (int x) {};
-
- Foo<num> fooNum = fooInt;
- fooNum.method(3);
- fooNum.method(2.5);
- fooNum.setter = 3;
- fooNum.setter = 2.5;
- fooNum.withCallback((num x) {});
- fooNum.mutableField = 3;
- fooNum.mutableField = 2.5;
- fooNum.mutableCallbackField(3);
- fooNum.mutableCallbackField(2.5);
- fooNum.mutableCallbackField = (num x) {};
-}
« no previous file with comments | « pkg/kernel/testcases/input/closure.dart ('k') | pkg/kernel/testcases/input/escape.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698