compiler: allow to use +=
on strings
This commit is contained in:
parent
fd7af77895
commit
59367c96d1
3 changed files with 24 additions and 11 deletions
|
@ -108,6 +108,16 @@ var assignTestCases = []testCase{
|
|||
`,
|
||||
big.NewInt(15),
|
||||
},
|
||||
{
|
||||
"add assign for string",
|
||||
`package foo
|
||||
func Main() string {
|
||||
s := "Hello, "
|
||||
s += "world!"
|
||||
return s
|
||||
}`,
|
||||
[]byte("Hello, world!"),
|
||||
},
|
||||
{
|
||||
"decl assign",
|
||||
`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue