mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
We were using _TMdT_ as a type metadata pointer, but it's really a full metadata symbol we need to offset to get the type metadata address. Swift SVN r5376
15 lines
258 B
Swift
15 lines
258 B
Swift
// RUN: %swift -i %s | FileCheck %s
|
|
|
|
// <rdar://problem/13995785> We were using the wrong type metadata pointer for the empty
|
|
// tuple.
|
|
|
|
func dup<T>(x:T) -> (T, T) {
|
|
return (x, x)
|
|
}
|
|
|
|
func drop<T>(x:T) {}
|
|
|
|
var x = ()
|
|
drop(dup(x))
|
|
println("ok") // CHECK: ok
|