mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Parse / AST: Allow let / var as argument labels with a warning.
The diagnostic is now a warning and the new message alerts the user that though it is valid to have let and var as argument label names, they are interpreted as argument labels, not keywords.
This commit is contained in:
@@ -30,8 +30,6 @@ using namespace camel_case;
|
||||
|
||||
bool swift::canBeArgumentLabel(StringRef identifier) {
|
||||
return llvm::StringSwitch<bool>(identifier)
|
||||
.Case("var", false)
|
||||
.Case("let", false)
|
||||
.Case("inout", false)
|
||||
.Case("$", false)
|
||||
.Default(true);
|
||||
|
||||
Reference in New Issue
Block a user