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

Side by Side Diff: test/codegen/covariance.dart

Issue 1988503002: Move generated files to gen/. (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Revise. Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5 class Foo<T> {
6 T _t;
7 add(T t) {
8 _t = t;
9 }
10
11 forEach(void fn(T t)) {
12 // No check needed for `fn`
13 fn(_t);
14 }
15 }
16
17 class Bar extends Foo<int> {
18 add(int x) {
19 print('Bar.add got $x');
20 super.add(x);
21 }
22 }
23
24 main() {
25 Foo<Object> foo = new Bar();
26 foo.add('hi'); // should throw
27 }
OLDNEW
« no previous file with comments | « test/codegen/corelib/string_operations_with_null_test.dart~ ('k') | test/codegen/expect/8invalid-chars.in+file_name.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698