blob: 51001855ecdd204447ca89aa4a500f69c247e174 [file] [log] [blame]
// RUN: %empty-directory(%t)
// RUN: %target-build-swift -O -wmo %s -o %t/a.out
// RUN: %target-codesign %t/a.out
// RUN: %target-run %t/a.out | %FileCheck %s
// REQUIRES: executable_test
protocol Foo {
var myName: String { get }
}
struct MyURL {
}
extension MyURL : Foo {
var myName : String { return "MyURL" }
}
struct MyStruct : Foo {
var myName : String { return "MyStruct" }
}
@inline(never) func getName(_ f: Foo) -> String {
return f.myName
}
@inline(never) func getName_wrapper() {
let u = MyURL()
// CHECK: MyURL
print(getName(u))
}
getName_wrapper()