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

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

Issue 109593003: Use a trail instead of a mark bit when processing recursive types in the VM (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | tests/language/language_dart2js.status » ('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) 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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Tests self referencing types.
6
7 import "package:expect/expect.dart";
8
9 class Base<U, V> {
10 get u => U;
11 get v => V;
12 }
13
14 class Derived1<U, V> extends Base<Derived1<U, V>,
15 Derived1<Derived2<V, U>, Derived2>> {}
16
17 class Derived2<U, V> extends Base<Derived2<U, V>,
18 Derived2<Derived1<V, U>, Derived1>> {}
19
20 main() {
21 var d = new Derived1<Derived1, Derived2>();
22 Expect.equals("Derived1<Derived1, Derived2>", d.u.toString());
23 Expect.equals("Derived1<Derived2<Derived2, Derived1>, Derived2>",
24 d.v.toString());
25 Expect.isTrue(d is Derived1<Derived1, Derived2>);
26 Expect.isFalse(d is Derived1<Derived1, Derived1>);
27 Expect.isTrue(d is Base<Derived1<Derived1, Derived2>,
28 Derived1<Derived2<Derived2, Derived1>, Derived2>>);
29 Expect.isFalse(d is Base<Derived1<Derived1, Derived2>,
30 Derived1<Derived2<Derived2, Derived2>, Derived2>>);
31 }
OLDNEW
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698