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

Side by Side Diff: test/samples/runtimetypechecktest.dart

Issue 1879373004: Implement modular compilation (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « test/samples/return_test.dart ('k') | test/samples/trusttypes1.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library runtimetypechecktest;
6
7 class A<T> {
8 T x;
9 A(this.x);
10
11 isT(t) => t is T;
12 }
13
14 class B extends A<int> {
15 B(int x) : super(x);
16 }
17
18 int foo(B b) => b.x;
19
20 typedef int Foo(B b);
21
22 void main() {
23 var a = new B(42);
24 print(a is A);
25 print(a as A);
26 print(a is B);
27 print(a as B);
28 print(a is A<int>);
29 print(a as A<int>);
30 print(foo is Foo);
31 print(a is dynamic);
32 print(a as dynamic);
33 }
OLDNEW
« no previous file with comments | « test/samples/return_test.dart ('k') | test/samples/trusttypes1.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698