diff options
author | Xing Zheng <betree.x@gmail.com> | 2022-01-04 00:16:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-04 00:16:36 +0800 |
commit | d24f135208ca072eb7be3320c1221d192d65c9cf (patch) | |
tree | 94b72dac529134c9c9233509897511271abc7f54 | |
parent | ce170de16df0fbcfa2440565409762b447c303f8 (diff) |
fix a typo (#4172)
the variable name should be `someIdentifier` instead of `willSet`.
-rw-r--r-- | swift.html.markdown | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/swift.html.markdown b/swift.html.markdown index 0e68e65f..e46dcc75 100644 --- a/swift.html.markdown +++ b/swift.html.markdown @@ -654,7 +654,7 @@ class Rect: Shape { // but still want to run code before and after getting or setting // a property, you can use `willSet` and `didSet` 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) { print(someIdentifier) } |