Skip to content

Commit 9641984

Browse files
committed
IRGen/constructor.swift is an interpreter test.
Put it in its place. Swift SVN r4727
1 parent 69fb051 commit 9641984

File tree

1 file changed

+23
-7
lines changed

1 file changed

+23
-7
lines changed

test/IRGen/constructor.swift renamed to test/Interpreter/constructor.swift

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,17 @@ class B<T> {
1010
constructor() { println("d") }
1111
constructor(x:Int) { println("e") }
1212
constructor(x:T) { println("f") }
13-
/* FIXME: Generic ctors of generic classes currently assert out.
14-
rdar://problem/13083304
13+
1514
constructor<U>(x:Int, y:U) { println("g") }
1615
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") }
1824
}
1925

2026
// CHECK: a
@@ -31,9 +37,19 @@ new BChar()
3137
new BChar(1)
3238
// CHECK: f
3339
new BChar('2')
34-
/* FIXME
35-
// C/HECK: g
40+
// CHECK: g
3641
new BChar(1, "2")
37-
// C/HECK: h
42+
// CHECK: h
3843
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())

0 commit comments

Comments
 (0)