compiler: load constants directly on inline

This commit is contained in:
Evgeniy Stratonikov 2021-02-05 16:15:26 +03:00
parent 27e60455c7
commit 3484025065
4 changed files with 39 additions and 19 deletions

View file

@ -110,8 +110,7 @@ func TestInlineConversion(t *testing.T) {
func Main() int {
a := 2
{
b := 1
return (b + a) * (b + a)
return (1 + a) * (1 + a)
}
}`
b2, err := compiler.Compile("foo.go", strings.NewReader(src2))