mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
17 lines
192 B
Plaintext
17 lines
192 B
Plaintext
class A {
|
|
var a = 2
|
|
fileprivate func new_name(_ newValue: Int) {
|
|
a = newValue
|
|
}
|
|
|
|
subscript(_ : Int) -> Int {
|
|
get {
|
|
return 1
|
|
}
|
|
set {
|
|
new_name(newValue)
|
|
}
|
|
}
|
|
}
|
|
|