From 69c79b8d0271398eecd7d289a404abfba1c0d3cd Mon Sep 17 00:00:00 2001 From: CiYuan53 <27101659+CiYuan53@users.noreply.github.com> Date: Sun, 19 Jun 2022 18:45:41 -0700 Subject: [PATCH] fix tiny typo of wrong usage Chinese punctuation (#1191) --- source/02_language_guide/11_Methods.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/02_language_guide/11_Methods.md b/source/02_language_guide/11_Methods.md index 25e98451..b0999ccb 100755 --- a/source/02_language_guide/11_Methods.md +++ b/source/02_language_guide/11_Methods.md @@ -105,7 +105,7 @@ print("The point is now at (\(somePoint.x), \(somePoint.y))") // 打印“The point is now at (3.0, 4.0)” ``` -上面的 `Point` 结构体定义了一个可变方法 `moveBy(x:y :)` 来移动 `Point` 实例到给定的位置。该方法被调用时修改了这个点,而不是返回一个新的点。方法定义时加上了 `mutating` 关键字,从而允许修改属性。 +上面的 `Point` 结构体定义了一个可变方法 `moveBy(x:y:)` 来移动 `Point` 实例到给定的位置。该方法被调用时修改了这个点,而不是返回一个新的点。方法定义时加上了 `mutating` 关键字,从而允许修改属性。 注意,不能在结构体类型的常量(a constant of structure type)上调用可变方法,因为其属性不能被改变,即使属性是变量属性,详情参见 [常量结构体的存储属性](./10_Properties.md#stored-properties-of-constant-structure-instances):