File tree 2 files changed +12
-1
lines changed
e2e/suite/testcases/documentation
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -181,3 +181,12 @@ Some interesting list
181
181
- Point 1
182
182
with other line
183
183
- Point 2
184
+
185
+ ========================================================================
186
+ Function documentation with T? type
187
+ ========================================================================
188
+ fun <caret>foo(): Int? {}
189
+ ------------------------------------------------------------------------
190
+ ```tact
191
+ fun foo(): Int?
192
+ ```
Original file line number Diff line number Diff line change @@ -337,7 +337,9 @@ export class Fun extends NamedNode {
337
337
if ( ! parametersNode ) return ""
338
338
339
339
const result = this . returnType ( )
340
- return parametersNode . text + ( result ? `: ${ result . node . text } ` : "" )
340
+ const suffix = result ?. node . nextSibling ?. text === "?" ? "?" : ""
341
+
342
+ return parametersNode . text + ( result ? `: ${ result . node . text } ${ suffix } ` : "" )
341
343
}
342
344
343
345
public isOverride ( ) : boolean {
You can’t perform that action at this time.
0 commit comments