mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
23 lines
290 B
Swift
23 lines
290 B
Swift
// RUN: %target-run-simple-swift | FileCheck %s
|
|
|
|
class HeapBuf<Element> {}
|
|
|
|
struct XBuffer {
|
|
var _storage: HeapBuf<()>
|
|
}
|
|
|
|
class Q {}
|
|
|
|
func hexAddr(x: AnyObject) -> Q {
|
|
return Q()
|
|
}
|
|
|
|
func crash() {
|
|
hexAddr(XBuffer(_storage: HeapBuf<()>())._storage)
|
|
}
|
|
|
|
crash()
|
|
|
|
// CHECK: ok
|
|
println("ok")
|