Files
swift-mirror/test/SILGen/capture-canonicalization.swift
Michael Gottesman 20c3e1e92f [semantic-sil] Update 45 SILGen tests for ownership.
Very roughly this increases the total coverage of SILGen tests with ownership
enabled to ~20%.

rdar://33358110
2017-08-20 19:11:55 -07:00

15 lines
340 B
Swift

// RUN: %target-swift-frontend -emit-silgen -enable-sil-ownership %s | %FileCheck %s
struct Foo<T> {}
struct Bar {}
extension Foo where T == Bar {
func foo(x: T) -> Bar {
// CHECK-LABEL: sil private @{{.*}}3foo{{.*}}4foo2{{.*}} : $@convention(thin) (Bar) -> Bar
func foo2() -> Bar {
return x
}
return foo2()
}
}