fix a typo (#4172)

the variable name should be `someIdentifier` instead of `willSet`.
This commit is contained in:
Xing Zheng 2022-01-04 00:16:36 +08:00 committed by GitHub
parent ce170de16d
commit d24f135208
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -654,7 +654,7 @@ class Rect: Shape {
// but still want to run code before and after getting or setting // but still want to run code before and after getting or setting
// a property, you can use `willSet` and `didSet` // a property, you can use `willSet` and `didSet`
var identifier: String = "defaultID" { var identifier: String = "defaultID" {
// the `willSet` arg will be the variable name for the new value // the `someIdentifier` arg will be the variable name for the new value
willSet(someIdentifier) { willSet(someIdentifier) {
print(someIdentifier) print(someIdentifier)
} }