File tree Expand file tree Collapse file tree 1 file changed +23
-7
lines changed Expand file tree Collapse file tree 1 file changed +23
-7
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,17 @@ class B<T> {
10
10
constructor ( ) { println ( " d " ) }
11
11
constructor ( x: Int) { println ( " e " ) }
12
12
constructor ( x: T) { println ( " f " ) }
13
- /* FIXME: Generic ctors of generic classes currently assert out.
14
- rdar://problem/13083304
13
+
15
14
constructor < U > ( x: Int, y: U) { println ( " g " ) }
16
15
constructor < U > ( x: T, y: U) { println ( " h " ) }
17
- */
16
+ }
17
+
18
+ protocol Runcible { }
19
+
20
+ class C < T : Runcible > {
21
+ constructor ( ) { println ( " i " ) }
22
+ constructor ( x: Int) { println ( " j " ) }
23
+ constructor ( x: T) { println ( " k " ) }
18
24
}
19
25
20
26
// CHECK: a
@@ -31,9 +37,19 @@ new BChar()
31
37
new BChar( 1 )
32
38
// CHECK: f
33
39
new BChar( '2 ')
34
- /* FIXME
35
- // C/HECK: g
40
+ // CHECK: g
36
41
new BChar( 1 , " 2 " )
37
- // C/HECK : h
42
+ // CHECK : h
38
43
new BChar( '1 ', " 2 " )
39
- */
44
+
45
+ // <rdar://problem/12965934> Destructors for classes with constrained type parameters
46
+
47
+ struct Hat : Runcible { }
48
+
49
+ typealias CHat = C < Hat >
50
+ // CHECK: i
51
+ new CHat( )
52
+ // CHECK: j
53
+ new CHat( 1 )
54
+ // CHECK: k
55
+ new CHat( Hat ( ) )
You can’t perform that action at this time.
0 commit comments