Files
swift-mirror/test/DebugInfo/dynamic_layout.swift
Adrian Prantl 4f11ecc1da Get rid of Int in the debug info tests and preform some general cleanup.
<rdar://problem/20856296> Extinguish 'Int' from DebugInfo tests

Swift SVN r31177
2015-08-12 18:16:43 +00:00

26 lines
521 B
Swift

// RUN: %target-swift-frontend %s -emit-ir -g -o - | FileCheck %s
func markUsed<T>(t: T) {}
class Class <T> {
var x: T
init(_x : T) {x = _x}
// Verify that the mangling of the decl context of the type U is correct.
// CHECK: !DICompositeType({{.*}}name: "{{[^"]*}}_TtQq_FC14dynamic_layout5Class3foo{{[^"]*}}"
func foo <U> (y : U) -> (T,U) {
var tuple = (x,y)
return tuple
}
}
func main() {
var v = Class<Int64>(_x: 1)
var tuple = v.foo("hi")
markUsed(tuple.0)
markUsed(tuple.1)
}
main()