Skip to content
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

语言参考:声明-特殊参数,示例代码注释错误 #1195

Closed
zhaocy0726 opened this issue Jul 19, 2022 · 1 comment
Closed

语言参考:声明-特殊参数,示例代码注释错误 #1195

zhaocy0726 opened this issue Jul 19, 2022 · 1 comment

Comments

@zhaocy0726
Copy link

func f(x: Int = 42) -> Int { return x }

f() // 有效,使用默认值
f(7) // 有效,提供了值 // <- 无效的
f(x: 7) // 无效,该参数没有外部名称 // <- 有效的

numbbbbb added a commit that referenced this issue Jul 19, 2022
@numbbbbb
Copy link
Member

已修改

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants