compiler: revert a part of ad65d1fa1f

Close #2335.
This commit is contained in:
AnnaShaleva 2022-02-24 13:39:39 +03:00 committed by AnnaShaleva
parent 753d604784
commit a4d402da86

View file

@ -11,7 +11,6 @@ import (
"io"
"os"
"path/filepath"
"runtime"
"strings"
"github.com/nspcc-dev/neo-go/pkg/smartcontract/binding"
@ -162,14 +161,7 @@ func getBuildInfo(name string, src interface{}) (*buildInfo, error) {
default:
panic(fmt.Sprintf("unsupported src type: %T", s))
}
if strings.HasPrefix(runtime.Version(), "go1.15") {
dir = os.TempDir()
name = filepath.Join(dir, filepath.Base(name))
absName = name
names = append(names, "file="+name)
} else {
names = append(names, name)
}
names = append(names, name)
conf.Overlay[absName] = buf
} else {
if strings.HasSuffix(name, ".go") {