File tree 2 files changed +41
-0
lines changed
e2e/suite/testcases/completion
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,13 @@ export class CompletionContext {
160
160
if ( parent . type . endsWith ( "_function" ) ) {
161
161
this . isExpression = false
162
162
this . isStatement = false
163
+ this . inParameter = true
164
+ }
165
+
166
+ if ( parent . type === "ERROR" && parent . parent ?. type . endsWith ( "_function" ) ) {
167
+ this . isExpression = false
168
+ this . isStatement = false
169
+ this . inParameter = true
163
170
}
164
171
165
172
if ( parent . type === "trait_list" ) {
Original file line number Diff line number Diff line change @@ -50,3 +50,37 @@ contract Foo {
50
50
14 try-catch
51
51
14 until
52
52
14 while
53
+
54
+ ========================================================================
55
+ Completion inside `receive()` parameters
56
+ ========================================================================
57
+ contract Foo {
58
+ receive(<caret>) {}
59
+ }
60
+ ------------------------------------------------------------------------
61
+ 0 contract
62
+ 0 Foo
63
+ 0 receive
64
+
65
+ ========================================================================
66
+ Completion inside `external()` parameters
67
+ ========================================================================
68
+ contract Foo {
69
+ external(<caret>) {}
70
+ }
71
+ ------------------------------------------------------------------------
72
+ 0 contract
73
+ 0 external
74
+ 0 Foo
75
+
76
+ ========================================================================
77
+ Completion inside `fun()` parameters
78
+ ========================================================================
79
+ contract Foo {
80
+ fun foo(<caret>) {}
81
+ }
82
+ ------------------------------------------------------------------------
83
+ 0 contract
84
+ 0 Foo
85
+ 0 foo
86
+ 0 fun
You can’t perform that action at this time.
0 commit comments