Files
swift-mirror/test/DebugInfo/if-var.swift
2016-08-10 23:52:02 -07:00

12 lines
254 B
Swift

// RUN: %target-swift-frontend %s -emit-ir -g -o - | %FileCheck %s
func markUsed<T>(_ t: T) {}
public func f(_ s : String?)
{
if var str = s {
// CHECK: !DILocalVariable(name: "str", {{.*}}line: [[@LINE-1]]
str = "foo"
markUsed(str)
}
}