File tree Expand file tree Collapse file tree 2 files changed +25
-1
lines changed
validation-test/IDE/crashers_2_fixed Expand file tree Collapse file tree 2 files changed +25
-1
lines changed Original file line number Diff line number Diff line change @@ -2925,7 +2925,7 @@ class ConstraintSystem {
2925
2925
// / Whether the argument \p Arg occurs after the code completion token and
2926
2926
// / thus should be ignored and not generate any fixes.
2927
2927
bool isArgumentIgnoredForCodeCompletion (Expr *Arg) const {
2928
- return IgnoredArguments.count (Arg) > 0 ;
2928
+ return IgnoredArguments.count (Arg) > 0 && isForCodeCompletion () ;
2929
2929
}
2930
2930
2931
2931
// / Whether the constraint system has ignored any arguments for code
Original file line number Diff line number Diff line change
1
+ // RUN: %empty-directory(%t)
2
+ // RUN: %target-swift-ide-test -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
3
+
4
+ func overloaded( content: ( ) -> Int ) { }
5
+ func overloaded( @MyResultBuilder stuff: ( ) -> Int ) { }
6
+
7
+ @resultBuilder struct MyResultBuilder {
8
+ static func buildExpression( _ content: Int ) -> Int { content }
9
+ static func buildBlock( ) -> Int { 4 }
10
+ }
11
+
12
+ struct HStack {
13
+ init ( spacing: Double , @MyResultBuilder content: ( ) -> Int ) { }
14
+ func qadding( _ length: Double ) { }
15
+ }
16
+
17
+ func test( ) {
18
+ overloaded {
19
+ HStack ( spacing: #^COMPLETE^#) { }
20
+ . qadding ( 32 )
21
+ }
22
+ }
23
+
24
+ // COMPLETE: Literal[Integer]/None/TypeRelation[Convertible]: 0[#Double#]; name=0
You can’t perform that action at this time.
0 commit comments