mirror of
https://github.com/apple/swift.git
synced 2026-10-30 22:15:52 +01:00
Made the tests run, then fixed various issues with them. rdar://101623384
19 lines
268 B
Swift
19 lines
268 B
Swift
struct Foo<T> {
|
|
var value: T
|
|
}
|
|
|
|
func crash() {
|
|
print("I'm going to crash here")
|
|
let ptr = UnsafeMutablePointer<Int>(bitPattern: 4)!
|
|
ptr.pointee = 42
|
|
}
|
|
|
|
@main
|
|
struct CrashWithThunk {
|
|
static func main() {
|
|
let foo = Foo(value: crash)
|
|
|
|
foo.value()
|
|
}
|
|
}
|