mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Add initializers to postfix-expr code completions
Previously, the only way to get initializers was completing after the
name of the type:
Foo#^complete_here^#
Foo(#^or_here^#
And now it will also work in unadorned expressions:
#^a_top_level_completion^#
bar(a, #^walked_into_a_bar^#
Unfortunately, not all our clients handle this well yet, so it's
protected by a language option.
-code-complete-inits-in-postfix-expr
Swift SVN r27275
This commit is contained in:
@@ -119,6 +119,10 @@ namespace swift {
|
||||
/// Should access control be respected?
|
||||
bool EnableAccessControl = true;
|
||||
|
||||
/// Whether to include initializers when code-completing a postfix
|
||||
/// expression.
|
||||
bool CodeCompleteInitsInPostfixExpr = false;
|
||||
|
||||
/// Should we check the target OSs of serialized modules to see that they're
|
||||
/// new enough?
|
||||
bool EnableTargetOSChecking = true;
|
||||
|
||||
@@ -147,6 +147,9 @@ def disable_access_control : Flag<["-"], "disable-access-control">,
|
||||
def enable_access_control : Flag<["-"], "enable-access-control">,
|
||||
HelpText<"Respect access control restrictions">;
|
||||
|
||||
def code_complete_inits_in_postfix_expr : Flag<["-"], "code-complete-inits-in-postfix-expr">,
|
||||
HelpText<"Include initializers when completing a postfix expression">;
|
||||
|
||||
def disable_diagnostic_passes : Flag<["-"], "disable-diagnostic-passes">,
|
||||
HelpText<"Don't run diagnostic passes">;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user