Closed gewang closed 1 year ago
more info: likely caused by add-assign to a string variable declaration
this works:
string foo;
"foo" +=> foo;
this crashes:
"foo" +=> string foo;
this raised the issue of whether add-assign to variable declarations should be allowed in the first place; after conferring with @nshaheed @spencersalazar, we decided to disallow this at the compilation stage (pushed in b997f80)
a.ck:1:7: error: cannot perform '+=>' on a variable declaration...
[1] "foo" +=> string s;
^
a.ck: ...(hint: use '=>' instead to initialize the variable)
possible location of issue
Chuck_Instr_Add_string_Assign::execute()