Created
May 13, 2019 04:43
-
-
Save omochi/ce2c38d5dc45b1727fcd55169b6370f2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// HogeLib.framework | |
public struct S { | |
public let a: Int | |
public let b: Int | |
} | |
// YourApp | |
extension S { | |
public mutating func setA(_ a: Int) { | |
self = S(a: a, b: b) | |
} | |
} | |
var s = S(a: 0, b: 0) | |
s.setA(3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment