Skip to content

Commit 3ef5ef0

Browse files
authored
Merge pull request swiftlang#8232 from slavapestov/two-more-crashers
Last two crashers for the evening
2 parents e8413ba + 6019754 commit 3ef5ef0

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// RUN: not --crash %target-swift-frontend -emit-silgen -primary-file %s -o /dev/null
2+
3+
class Base<T> {
4+
convenience init(count: Int) {
5+
self.init(count: count, designated: ())
6+
}
7+
8+
init(count: Int, designated: ()) {
9+
}
10+
}
11+
12+
class Derived<T> : Base<T> {
13+
convenience init() {
14+
self.init(count: 0)
15+
}
16+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// RUN: not --crash %target-swift-frontend -typecheck -primary-file %s
2+
3+
protocol P {
4+
init()
5+
}
6+
7+
extension P {
8+
public init(x: Int, y: Int? = nil) {
9+
self.init()
10+
}
11+
}
12+
13+
func foo(t: P.Type, a: Int) {
14+
let _ = t(x: a)
15+
}

0 commit comments

Comments
 (0)