Skip to content

fix: GuideTour semantic adjustment #1417

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion swift-6.docc/GuidedTour/GuidedTour.md
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ print(teamScore)
<< Would you like a jelly baby?
-->

在 `if` 语句中,条件必须是一个布尔表达式——这意味着像 `if score { ... }` 这样的代码是错误的,而不是隐式地将 `score` 与零进行比较
在 `if` 语句中,条件必须是一个布尔表达式——这意味着像 `if score { ... }` 这样的代码是错误的,这不是 `score` 与零进行隐式比较的方法

你可以在赋值操作符(`=`)或 `return` 之后使用 `if` 或 `switch`,以根据条件选择一个值。

Expand Down