-
Notifications
You must be signed in to change notification settings - Fork 753
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42647 from nipunayf/fix-42591-master
[Master] Add the union of the types in the `Create variable with type` code action
- Loading branch information
Showing
18 changed files
with
768 additions
and
15 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
69 changes: 69 additions & 0 deletions
69
...rces/codeaction/create-var-with-type/config/type_infer_for_action_with_union_config1.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": 50, | ||
"character": 18 | ||
}, | ||
"source": "source2.bal", | ||
"expected": [ | ||
{ | ||
"title": "Create variable with 'Rec1|Rec2'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 50, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 50, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "Rec1|Rec2 targetType = " | ||
} | ||
], | ||
"resolvable": false | ||
}, | ||
{ | ||
"title": "Create variable with 'Rec1'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 50, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 50, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "Rec1 targetType = " | ||
} | ||
], | ||
"resolvable": false | ||
}, | ||
{ | ||
"title": "Create variable with 'Rec2'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 50, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 50, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "Rec2 targetType = " | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
69 changes: 69 additions & 0 deletions
69
...rces/codeaction/create-var-with-type/config/type_infer_for_action_with_union_config2.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": 51, | ||
"character": 18 | ||
}, | ||
"source": "source2.bal", | ||
"expected": [ | ||
{ | ||
"title": "Create variable with 'Rec1|string|Error2'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 51, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 51, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "Rec1|string|Error2 unionResult = " | ||
} | ||
], | ||
"resolvable": false | ||
}, | ||
{ | ||
"title": "Create variable with 'string|Error2'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 51, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 51, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "string|Error2 unionResult = " | ||
} | ||
], | ||
"resolvable": false | ||
}, | ||
{ | ||
"title": "Create variable with 'Rec1|Error2'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 51, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 51, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "Rec1|Error2 unionResult = " | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
69 changes: 69 additions & 0 deletions
69
...rces/codeaction/create-var-with-type/config/type_infer_for_action_with_union_config3.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": 52, | ||
"character": 18 | ||
}, | ||
"source": "source2.bal", | ||
"expected": [ | ||
{ | ||
"title": "Create variable with 'Rec2|Rec3|error'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 52, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 52, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "Rec2|Rec3|error unionResult = " | ||
} | ||
], | ||
"resolvable": false | ||
}, | ||
{ | ||
"title": "Create variable with 'Rec2|error'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 52, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 52, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "Rec2|error unionResult = " | ||
} | ||
], | ||
"resolvable": false | ||
}, | ||
{ | ||
"title": "Create variable with 'Rec3|error'", | ||
"kind": "quickfix", | ||
"edits": [ | ||
{ | ||
"range": { | ||
"start": { | ||
"line": 52, | ||
"character": 4 | ||
}, | ||
"end": { | ||
"line": 52, | ||
"character": 4 | ||
} | ||
}, | ||
"newText": "Rec3|error unionResult = " | ||
} | ||
], | ||
"resolvable": false | ||
} | ||
] | ||
} |
Oops, something went wrong.