mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Tests that crash the compiler are expected to fail under AddressSanitizer. Swift SVN r24071
60 lines
883 B
Swift
60 lines
883 B
Swift
// RUN: not --crash %target-swift-frontend %s -parse
|
|
// XFAIL: asan
|
|
|
|
// Distributed under the terms of the MIT license
|
|
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
|
|
// Test case found by fuzzing
|
|
|
|
class x<ji>: y {
|
|
init(u: ji) {
|
|
kj. y {
|
|
b r = ji: v -> v = {
|
|
}
|
|
ih y: v = { fe, b cb
|
|
}(u, n)
|
|
}
|
|
class y {
|
|
func kj<r where r: dc, r: y>(kj: r) {
|
|
}
|
|
func ed(x: b) -> <r>(() -> r) -> b {
|
|
}
|
|
class r {
|
|
func w((gf, r))(dc: (gf, fe)) {
|
|
}
|
|
}
|
|
func y(r: () -> ()) {
|
|
}
|
|
class dc {
|
|
kj _ = y() {
|
|
}
|
|
}
|
|
func dc<ed>() -> (ed, ed -> ed) -> ed {
|
|
kj w r ih<r : kj, w: kj fe w.n == r.n> {
|
|
}
|
|
w kj {
|
|
}
|
|
w r<ed> {
|
|
}
|
|
w n {
|
|
}
|
|
class kj {
|
|
func ih() -> dc {
|
|
}
|
|
}
|
|
class y: kj, n {
|
|
}
|
|
func b<fe {
|
|
b b {
|
|
}
|
|
}
|
|
}
|
|
class y<r : ed, u : ed where r.ed == u> : n {
|
|
}
|
|
class y<r, u> {
|
|
}
|
|
protocol ed {
|
|
}
|
|
protocol n {
|
|
}
|
|
protocol ed : y { func y
|