Files
swift-mirror/test/SILGen/mangling_ext_structA.swift
Michael Gottesman 862b20426a [silgen] Update another 32 SILGen tests for running with the ownership verifier enabled.
Now ~45% of the SILGen tests run with the ownership verifier enabled.

rdar://33358110
2017-08-21 21:52:17 -07:00

30 lines
728 B
Swift

// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -emit-module -enable-sil-ownership -o %t %S/Inputs/def_structA.swift
// RUN: %target-swift-frontend -emit-silgen -enable-sil-ownership -module-name ext_structA -I %t %s | %FileCheck %s
// Ensure that members of extensions of types from another module are mangled
// correctly.
import def_structA
extension A {
mutating func test() {
a = 1
}
struct NestedType {
func test() {}
}
}
func markUsed<T>(_ t: T) {}
// CHECK-LABEL: sil hidden @_T011def_structA1AV04ext_B1AE4testyyF
var a = A()
markUsed(a.test())
// CHECK-LABEL: sil hidden @_T011def_structA1AV04ext_B1AE10NestedTypeV4testyyF
var nestedType = A.NestedType()
markUsed(nestedType.test())