Files
swift-mirror/test/Interpreter/rdar15674812.swift
2016-08-10 23:52:02 -07:00

24 lines
320 B
Swift

// RUN: %target-run-simple-swift | %FileCheck %s
// REQUIRES: executable_test
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
print("ok")