-
Notifications
You must be signed in to change notification settings - Fork 387
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes [this](#1849) by splitting value declarations with multiple values into single declarations with a single value. <details><summary>Contributors' checklist...</summary> - [x] Added new tests, or not needed, or not feasible - [x] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory - [x] Updated the official documentation or not needed - [x] No breaking changes were made, or a `BREAKING CHANGE: xxx` message was included in the description - [x] Added references to related issues and PRs --------- Co-authored-by: Morgan Bazalgette <[email protected]>
- Loading branch information
1 parent
8f800ec
commit aa4bc99
Showing
4 changed files
with
76 additions
and
16 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ package main | |
|
||
func main() { | ||
var a, b, c = 1, a+1 | ||
|
||
println(a) | ||
println(b) | ||
println(c) | ||
|
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,14 @@ | ||
package main | ||
|
||
func main() { | ||
println(a) | ||
println(b) | ||
println(c) | ||
} | ||
|
||
var a, b, c = 1, a + 1, b + 1 | ||
|
||
// Output: | ||
// 1 | ||
// 2 | ||
// 3 |
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,17 @@ | ||
package main | ||
|
||
func main() { | ||
println(a) | ||
println(b) | ||
println(c) | ||
println(d) | ||
} | ||
|
||
var a, b, c = 1, a + d, 3 | ||
var d = a | ||
|
||
// Output: | ||
// 1 | ||
// 2 | ||
// 3 | ||
// 1 |