, (@_inlineable, @_versioned, @_fixed_layout), ( , , ). , .
, - , , , . (i.e public ).
, , - , inlineable, , . , ; .
, Swift 4, - Swift , :
Swift 3.1 , , Swift 4 .
, (, MyClass.defaultValue ), , . defaultValue .
, private ( ). , , @_versioned, (file)private - :
, @_versioned private fileprivate, , :
"", . , ABI, - .
, @_versioned - ABI . , private @_versioned, , public.
"private versioned". , internal .
@_versioned var defaultValue, :
open class MyClass {
private let value: Int
@_versioned static var defaultValue: Int {
return 10
}
public init(value: Int = MyClass.defaultValue) {
self.value = value
}
}
MyClass.defaultValue , - ( internal). . , , , , ; , .