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

Side by Side Diff: tests/language/src/CyclicTypeVariableTest.dart

Issue 9186017: Fix crash in dartc when given cyclic type variable bounds. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated unit test Created 8 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 | « tests/language/language-leg.status ('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
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 // Tests cyclic reference to type variables in type expressions
6
7 typedef void funcType<T
8 extends T /// 01: static type error
9 >(T arg);
gbracha 2012/01/11 23:04:34 We don't have generic functions (or even factories
mmendez 2012/01/12 15:29:50 Unless there is some other countering clause, I th
10
11
12 interface A<S
mmendez 2012/01/12 15:29:50 This should be a warning per the spec.
zundel 2012/01/12 15:33:59 Yes. the 'static type error' is at the warning l
13 extends S /// 02: static type error
14 > {
15 S field;
16 }
17
18 interface B<U
19 extends List<U> /// 03: static type error
gbracha 2012/01/11 23:04:34 This should be perfectly legal.
zundel 2012/01/12 12:53:55 How could you make a legal substitution into this?
20 > {
21 U field;
22 }
23
24 class C<V
25 extends V /// 04: static type error
26 > implements A<V> {
27 V field;
28 }
29
30 class D<W
31 extends List<W> /// 05: static type error
gbracha 2012/01/11 23:04:34 Again, this is perfectly valid.
32 > implements B<W>{
33 W field;
34 }
35
36
37 class E<X
38 extends funcType<X> /// 06: static type error
gbracha 2012/01/11 23:04:34 Since functType isn't valid, the point is moot, bu
39 > {
40 X field;
41 }
42
43 main() {
44 new C<List<Object>>();
45 new D<List<Object>>();
46 new E<funcType<Object>>();
47 funcType<Object> val = null;
48 }
OLDNEW
« no previous file with comments | « tests/language/language-leg.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698