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

Side by Side Diff: tests/standalone/assert_assignable_canon_test.dart

Issue 2984363004: Migrate first block of tests in standalone to standalone_2 (Closed)
Patch Set: Remove Expect.throws Created 3 years, 4 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 | « no previous file | tests/standalone/assert_test.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) 2016, 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 // VMOptions=--enable-inlining-annotations --optimization-counter-threshold=10 - -no-background-compilation
6
7 const AlwaysInline = "AlwaysInline";
8 const NeverInline = "NeverInline";
9
10 abstract class A<T extends A<T>> {
11 @AlwaysInline
12 f(x) => new R<T>(x);
13 }
14
15 class B extends A<B> {}
16
17 class R<T> {
18 @AlwaysInline
19 R(T field);
20 }
21
22 class C extends B {}
23
24 class D extends C {}
25
26 // f will be inlined and T=B will be forwarded to AssertAssignable in the
27 // R. However B will be wrapped in the TypeRef which breaks runtime TypeCheck
28 // function (Instance::IsInstanceOf does not work for TypeRefs).
29 @NeverInline
30 f(o) => new B().f(o);
31
32 main() {
33 final o = new D();
34 for (var i = 0; i < 10; i++) {
35 f(o);
36 }
37 }
OLDNEW
« no previous file with comments | « no previous file | tests/standalone/assert_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698