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