-
Notifications
You must be signed in to change notification settings - Fork 758
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
562 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
...rc/test/resources/codeaction/fix-return-type/config/fixReturnTypeForConditionalExpr1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"position": { | ||
"line": 6, | ||
"character": 39 | ||
}, | ||
"source": "fixReturnTypeForConditionalExpr.bal", | ||
"expected": [ | ||
{ | ||
"title": "Change return type to 'boolean|int'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 5, | ||
"character": 76 | ||
}, | ||
"end": { | ||
"line": 5, | ||
"character": 76 | ||
} | ||
}, | ||
"newText": " returns boolean|int" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
29 changes: 29 additions & 0 deletions
29
...rc/test/resources/codeaction/fix-return-type/config/fixReturnTypeForConditionalExpr2.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"position": { | ||
"line": 6, | ||
"character": 51 | ||
}, | ||
"source": "fixReturnTypeForConditionalExpr.bal", | ||
"expected": [ | ||
{ | ||
"title": "Change return type to 'boolean|int'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 5, | ||
"character": 76 | ||
}, | ||
"end": { | ||
"line": 5, | ||
"character": 76 | ||
} | ||
}, | ||
"newText": " returns boolean|int" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
29 changes: 29 additions & 0 deletions
29
...rc/test/resources/codeaction/fix-return-type/config/fixReturnTypeForConditionalExpr3.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"position": { | ||
"line": 11, | ||
"character": 72 | ||
}, | ||
"source": "fixReturnTypeForConditionalExpr.bal", | ||
"expected": [ | ||
{ | ||
"title": "Change return type to 'module1:TestRecord1|int'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 9, | ||
"character": 76 | ||
}, | ||
"end": { | ||
"line": 9, | ||
"character": 76 | ||
} | ||
}, | ||
"newText": " returns module1:TestRecord1|int" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
29 changes: 29 additions & 0 deletions
29
...rc/test/resources/codeaction/fix-return-type/config/fixReturnTypeForConditionalExpr4.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"position": { | ||
"line": 11, | ||
"character": 81 | ||
}, | ||
"source": "fixReturnTypeForConditionalExpr.bal", | ||
"expected": [ | ||
{ | ||
"title": "Change return type to 'module1:TestRecord1|int'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 9, | ||
"character": 76 | ||
}, | ||
"end": { | ||
"line": 9, | ||
"character": 76 | ||
} | ||
}, | ||
"newText": " returns module1:TestRecord1|int" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
29 changes: 29 additions & 0 deletions
29
...rc/test/resources/codeaction/fix-return-type/config/fixReturnTypeForConditionalExpr5.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"position": { | ||
"line": 18, | ||
"character": 18 | ||
}, | ||
"source": "fixReturnTypeForConditionalExpr.bal", | ||
"expected": [ | ||
{ | ||
"title": "Change return type to 'string|boolean'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 17, | ||
"character": 50 | ||
}, | ||
"end": { | ||
"line": 17, | ||
"character": 50 | ||
} | ||
}, | ||
"newText": " returns string|boolean" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
29 changes: 29 additions & 0 deletions
29
...rc/test/resources/codeaction/fix-return-type/config/fixReturnTypeForConditionalExpr6.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"position": { | ||
"line": 18, | ||
"character": 28 | ||
}, | ||
"source": "fixReturnTypeForConditionalExpr.bal", | ||
"expected": [ | ||
{ | ||
"title": "Change return type to 'string|boolean'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 17, | ||
"character": 50 | ||
}, | ||
"end": { | ||
"line": 17, | ||
"character": 50 | ||
} | ||
}, | ||
"newText": " returns string|boolean" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
29 changes: 29 additions & 0 deletions
29
...rc/test/resources/codeaction/fix-return-type/config/fixReturnTypeForConditionalExpr7.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"position": { | ||
"line": 23, | ||
"character": 74 | ||
}, | ||
"source": "fixReturnTypeForConditionalExpr.bal", | ||
"expected": [ | ||
{ | ||
"title": "Change return type to 'string|int|boolean|module1:TestRecord1|float'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 21, | ||
"character": 91 | ||
}, | ||
"end": { | ||
"line": 21, | ||
"character": 91 | ||
} | ||
}, | ||
"newText": " returns string|int|boolean|module1:TestRecord1|float" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
29 changes: 29 additions & 0 deletions
29
...rc/test/resources/codeaction/fix-return-type/config/fixReturnTypeForConditionalExpr8.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"position": { | ||
"line": 23, | ||
"character": 86 | ||
}, | ||
"source": "fixReturnTypeForConditionalExpr.bal", | ||
"expected": [ | ||
{ | ||
"title": "Change return type to 'string|int|boolean|module1:TestRecord1|float'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 21, | ||
"character": 91 | ||
}, | ||
"end": { | ||
"line": 21, | ||
"character": 91 | ||
} | ||
}, | ||
"newText": " returns string|int|boolean|module1:TestRecord1|float" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
69 changes: 69 additions & 0 deletions
69
...core/src/test/resources/codeaction/fix-return-type/config/fixReturnTypeForQueryExpr1.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"position": { | ||
"line": 29, | ||
"character": 11 | ||
}, | ||
"source": "fixReturnTypeForQueryExpr.bal", | ||
"expected": [ | ||
{ | ||
"title": "Change return type to 'map<any>[]'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 28, | ||
"character": 32 | ||
}, | ||
"end": { | ||
"line": 28, | ||
"character": 32 | ||
} | ||
}, | ||
"newText": " returns map<any>[]" | ||
} | ||
], | ||
"resolvable": false | ||
}, | ||
{ | ||
"title": "Change return type to 'record {|string name; float gpa;|}[]'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 28, | ||
"character": 32 | ||
}, | ||
"end": { | ||
"line": 28, | ||
"character": 32 | ||
} | ||
}, | ||
"newText": " returns record {|string name; float gpa;|}[]" | ||
} | ||
], | ||
"resolvable": false | ||
}, | ||
{ | ||
"title": "Change return type to 'json[]'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 28, | ||
"character": 32 | ||
}, | ||
"end": { | ||
"line": 28, | ||
"character": 32 | ||
} | ||
}, | ||
"newText": " returns json[]" | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
Oops, something went wrong.