mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
This fixes compiler_crashers tests that use the ObjC interface on iOS hardware SDKs. Swift SVN r23458
75 lines
1.1 KiB
Swift
75 lines
1.1 KiB
Swift
// RUN: not %target-swift-frontend %s -parse
|
|
|
|
// Distributed under the terms of the MIT license
|
|
// Test case submitted to project by https://github.com/practicalswift (practicalswift)
|
|
// Test case found by fuzzing
|
|
|
|
({})
|
|
var f = 1
|
|
var e: Int -> Int = {
|
|
return $0
|
|
}
|
|
let d: Int = { c, b in
|
|
}(f, e)
|
|
class k {
|
|
func l((Any, k))(m }
|
|
}
|
|
func j<f: l: e -> e = {
|
|
|
|
{
|
|
l) {
|
|
m }
|
|
}
|
|
protocol k {
|
|
class func j()
|
|
}
|
|
class e: k{ }
|
|
}
|
|
func a(x: Any, y: Any) -> (((Any, Any) -> Any) -> Any) {
|
|
return {
|
|
(m: (Any, Any) -> Any) -> Any in
|
|
return m(x, y)
|
|
}
|
|
}
|
|
|
|
func b(z: (((Any, Any) - = b
|
|
=b as c=b
|
|
func q(v: h) -> <r>(() -> r) -> h {
|
|
n { u o "\(v): \(u())" }
|
|
}
|
|
struct e<r> {
|
|
j p: , () -> ())] = []
|
|
}
|
|
protocol p {
|
|
}
|
|
protocol m : p {
|
|
}
|
|
protocol v : p {
|
|
}
|
|
protocol m {
|
|
v = m
|
|
}
|
|
func s<s : m, v : m u v.v == s> (m: v) {
|
|
}
|
|
func s<v : m u v.v == v> (m: v) {
|
|
}
|
|
s( {
|
|
({})
|
|
}
|
|
t
|
|
func c<g>() -> (g, g -> g) -> g {
|
|
d b d.f = {
|
|
}
|
|
{
|
|
g) {
|
|
i }
|
|
}
|
|
i c {
|
|
class func f()
|
|
}
|
|
class d: c{ class func f {}
|
|
struct d<c : f,f where g.i == c.i>
|
|
fu ^(a: Bo
|
|
}
|
|
}
|