mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Implement support for making "with" implicit on the first argument of an initializer.
When importing an Objective-C init method or factory method into an initializer, if the first camelCase word of the first argument name starts with "with", drop the "with". This means that -initWithRed:green:blue:alpha: will get imported into Swift as init(red:green:blue:alpha:) as will +colorWithRed:green:blue:alpha: This is <rdar://problem/16795899>, hidden behind the -implicit-objc-with flag. Swift SVN r17271
This commit is contained in:
@@ -550,6 +550,7 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
|
||||
|
||||
Opts.EnableAppExtensionRestrictions = Args.hasArg(OPT_enable_app_extension);
|
||||
Opts.SplitPrepositions = Args.hasArg(OPT_split_objc_selectors);
|
||||
Opts.ImplicitObjCWith = Args.hasArg(OPT_implicit_objc_with);
|
||||
Opts.detailedTypeCheckDiagnostics = Args.hasArg(OPT_detailed_diagnostics);
|
||||
Opts.StrictKeywordArguments = Args.hasArg(OPT_strict_keyword_arguments);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user