compiler: allow to use += on strings

This commit is contained in:
Evgenii Stratonikov 2020-08-23 13:12:10 +03:00
parent fd7af77895
commit 59367c96d1
3 changed files with 24 additions and 11 deletions

View file

@ -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",
`