mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Disable the ability to use '$' as an identifier harder
When in Swift 3 Compatibility Mode we now acceptable a standalone '$' as an identifier. In all other cases this is now disallowed and must be surrounded by backticks.
This commit is contained in:
@@ -28,7 +28,8 @@ using namespace swift;
|
||||
using namespace camel_case;
|
||||
|
||||
bool swift::canBeArgumentLabel(StringRef identifier) {
|
||||
if (identifier == "var" || identifier == "let" || identifier == "inout")
|
||||
if (identifier == "var" || identifier == "let" || identifier == "inout" ||
|
||||
identifier == "$")
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user