Skip to content

Commit ecfce56

Browse files
committed
Don't exclude @autoclosure from the attribute list when printing override completions
1 parent 86d9d7a commit ecfce56

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

lib/IDE/CodeCompletion.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3947,6 +3947,7 @@ class CompletionOverrideLookup : public swift::VisibleDeclConsumer {
39473947
Options.setBaseType(transformType);
39483948
Options.PrintImplicitAttrs = false;
39493949
Options.ExclusiveAttrList.push_back(TAK_escaping);
3950+
Options.ExclusiveAttrList.push_back(TAK_autoclosure);
39503951
Options.PrintOverrideKeyword = false;
39513952
Options.PrintPropertyAccessors = false;
39523953
Options.PrintStaticKeyword = !hasStaticOrClass;

test/IDE/complete_override.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,12 +566,13 @@ class Deprecated2 : Deprecated1 {
566566

567567
class EscapingBase {
568568
func method(_ x: @escaping (@escaping ()->()) -> (()->())) -> (@escaping (@escaping ()->() )->()) { }
569+
func autoclosure(arg: @autoclosure () -> Bool) {}
569570
}
570571
class Escaping : EscapingBase {
571572
override func #^ESCAPING_1^#
572573
}
573574
// ESCAPING_1: Decl[InstanceMethod]/Super: method(_ x: @escaping (@escaping () -> ()) -> (() -> ())) -> ((@escaping () -> ()) -> ()) {|};
574-
575+
// ESCAPING_1: Decl[InstanceMethod]/Super: autoclosure(arg: @autoclosure () -> Bool) {|};
575576
class OverrideBase {
576577
static let staticLet = 0
577578
static var staticVar = 0

0 commit comments

Comments
 (0)