Skip to content

Commit 69c79b8

Browse files
authored
fix tiny typo of wrong usage Chinese punctuation (#1191)
1 parent a1b4a69 commit 69c79b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/02_language_guide/11_Methods.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ print("The point is now at (\(somePoint.x), \(somePoint.y))")
105105
// 打印“The point is now at (3.0, 4.0)”
106106
```
107107

108-
上面的 `Point` 结构体定义了一个可变方法 `moveBy(x:y :)` 来移动 `Point` 实例到给定的位置。该方法被调用时修改了这个点,而不是返回一个新的点。方法定义时加上了 `mutating` 关键字,从而允许修改属性。
108+
上面的 `Point` 结构体定义了一个可变方法 `moveBy(x:y:)` 来移动 `Point` 实例到给定的位置。该方法被调用时修改了这个点,而不是返回一个新的点。方法定义时加上了 `mutating` 关键字,从而允许修改属性。
109109

110110
注意,不能在结构体类型的常量(a constant of structure type)上调用可变方法,因为其属性不能被改变,即使属性是变量属性,详情参见 [常量结构体的存储属性](./10_Properties.md#stored-properties-of-constant-structure-instances)
111111

0 commit comments

Comments
 (0)