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

Side by Side Diff: tests/language/function_subtype1_test.dart

Issue 2599073002: dart2js rti fix: functions are subtypes of Object (Closed)
Patch Set: Created 4 years 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 | « tests/language/function_subtype0_test.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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. 3 // BSD-style license that can be found in the LICENSE file.
4 // Dart test program for constructors and initializers. 4 // Dart test program for constructors and initializers.
5 5
6 // Check function subtyping. 6 // Check function subtyping.
7 7
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 9
10 class C<T> {} 10 class C<T> {}
11 11
12 typedef _(); 12 typedef _();
13 typedef void void_(); 13 typedef void void_();
14 typedef void void_2(); 14 typedef void void_2();
15 typedef int int_(); 15 typedef int int_();
16 typedef int int_2(); 16 typedef int int_2();
17 typedef Object Object_(); 17 typedef Object Object_();
18 typedef double double_(); 18 typedef double double_();
19 typedef void void__int(int i); 19 typedef void void__int(int i);
20 typedef void void__Object(Object o);
20 typedef int int__int(int i); 21 typedef int int__int(int i);
21 typedef int int__int2(int i); 22 typedef int int__int2(int i);
22 typedef int int__Object(Object o); 23 typedef int int__Object(Object o);
23 typedef Object Object__int(int i); 24 typedef Object Object__int(int i);
24 typedef int int__double(double d); 25 typedef int int__double(double d);
25 typedef int int__int_int(int i1, int i2); 26 typedef int int__int_int(int i1, int i2);
26 typedef void inline_void_(void f()); 27 typedef void inline_void_(void f());
27 typedef void inline_void__int(void f(int i)); 28 typedef void inline_void__int(void f(int i));
28 29
29 main() { 30 main() {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // (int) -> int <: (double) -> int 63 // (int) -> int <: (double) -> int
63 Expect.isFalse(new C<int__int>() is C<int__double>); 64 Expect.isFalse(new C<int__int>() is C<int__double>);
64 // () -> int <: (int) -> int 65 // () -> int <: (int) -> int
65 Expect.isFalse(new C<int_>() is C<int__int>); 66 Expect.isFalse(new C<int_>() is C<int__int>);
66 // (int) -> int <: (int,int) -> int 67 // (int) -> int <: (int,int) -> int
67 Expect.isFalse(new C<int__int>() is C<int__int_int>); 68 Expect.isFalse(new C<int__int>() is C<int__int_int>);
68 // (int,int) -> int <: (int) -> int 69 // (int,int) -> int <: (int) -> int
69 Expect.isFalse(new C<int__int_int>() is C<int__int>); 70 Expect.isFalse(new C<int__int_int>() is C<int__int>);
70 // (()->void) -> void <: ((int)->void) -> void 71 // (()->void) -> void <: ((int)->void) -> void
71 Expect.isFalse(new C<inline_void_>() is C<inline_void__int>); 72 Expect.isFalse(new C<inline_void_>() is C<inline_void__int>);
73 // (Object) -> void <: ((int)->void) -> void
74 Expect.isTrue(new C<void__Object>() is C<inline_void__int>);
72 // ((int)->void) -> void <: (()->void) -> void 75 // ((int)->void) -> void <: (()->void) -> void
73 Expect.isFalse(new C<inline_void__int>() is C<inline_void_>); 76 Expect.isFalse(new C<inline_void__int>() is C<inline_void_>);
74 } 77 }
OLDNEW
« no previous file with comments | « tests/language/function_subtype0_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698