mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
If a method is defined within an extension of a class or struct that is defined in a different module, we mangle the module where the extension is defined. If we define function f in module A, and redefine it again in an extension in module B, we use different mangling to prevent linking in the wrong SILFunction. rdar://18057875 Swift SVN r21488
12 lines
135 B
Swift
12 lines
135 B
Swift
public struct A {
|
|
public var a : Int
|
|
public init() {
|
|
a = 3
|
|
}
|
|
}
|
|
extension A {
|
|
public mutating func test() {
|
|
a = 0
|
|
}
|
|
}
|