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

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

Issue 10993059: Stop using the Hashable interface. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Another space removed. Created 8 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 | « tests/language/type_guard_conversion_test.dart ('k') | tools/utils/vim/syntax/dart.vim » ('j') | 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 4
5 class A<T extends Hashable> { 5 class A<T> {
6 Function closure; 6 Function closure;
7 A._(this.closure); 7 A._(this.closure);
8 8
9 factory A() { 9 factory A() {
10 return new A._(() => new Set<T>()); 10 return new A._(() => new Set<T>());
11 } 11 }
12 12
13 A.bar() { 13 A.bar() {
14 closure = () => new Set<T>(); 14 closure = () => new Set<T>();
15 } 15 }
(...skipping 25 matching lines...) Expand all
41 Expect.isTrue(s is Set<int>); 41 Expect.isTrue(s is Set<int>);
42 Expect.isFalse(s is Set<double>); 42 Expect.isFalse(s is Set<double>);
43 43
44 s = ((new A<int>.bar()).closure)(); 44 s = ((new A<int>.bar()).closure)();
45 Expect.isTrue(s is Set<int>); 45 Expect.isTrue(s is Set<int>);
46 Expect.isFalse(s is Set<double>); 46 Expect.isFalse(s is Set<double>);
47 47
48 A.staticMethod(null); 48 A.staticMethod(null);
49 print(A.staticField); 49 print(A.staticField);
50 } 50 }
OLDNEW
« no previous file with comments | « tests/language/type_guard_conversion_test.dart ('k') | tools/utils/vim/syntax/dart.vim » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698