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:
@@ -263,6 +263,7 @@ Job *Swift::constructJob(const JobAction &JA, std::unique_ptr<JobList> Inputs,
|
||||
Args.AddLastArg(Arguments, options::OPT_import_objc_header);
|
||||
|
||||
Args.AddLastArg(Arguments, options::OPT_split_objc_selectors);
|
||||
Args.AddLastArg(Arguments, options::OPT_implicit_objc_with);
|
||||
Args.AddLastArg(Arguments, options::OPT_strict_keyword_arguments);
|
||||
|
||||
Args.AddLastArg(Arguments, options::OPT_detailed_diagnostics);
|
||||
|
||||
Reference in New Issue
Block a user