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

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

Issue 26124004: Base-level test for equality of f-bounded types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 | « no previous file | tests/language/language.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 import "package:expect/expect.dart";
6
7 class Magnitude<T> {
8 get t => T;
9 }
10 class Real extends Magnitude<Real> {}
11
12 class FBound<F extends FBound<F>> {
13 get f => F;
14 }
15 class Bar extends FBound<Bar> {}
16
17 main() {
18 var r = new Real();
19 Expect.equals(r.runtimeType, Real);
20 Expect.equals(r.t, Real);
21 Expect.equals(r.runtimeType, r.t);
22
23 var b = new Bar();
24 Expect.equals(b.runtimeType, Bar);
25 Expect.equals(b.f, Bar);
26 Expect.equals(b.runtimeType, b.f);
27 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/language.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698