Files
swift-mirror/test/Interpreter/generic_tuple.swift
Joe Groff 24c8e9b147 IRGen: Get correct type metadata address for empty tuple.
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
2013-05-29 17:37:56 +00:00

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