main: fix multiple errors being reported as one

Этот коммит содержится в:
Ayke van Laethem 2019-05-08 15:59:41 +02:00 коммит произвёл Ron Evans
родитель 141a70f401
коммит 08ee1916f5

Просмотреть файл

@ -103,7 +103,10 @@ func Compile(pkgName, outpath string, spec *TargetSpec, config *BuildConfig, act
// Compile Go code to IR.
errs := c.Compile(pkgName)
if errs != nil {
if len(errs) != 0 {
if len(errs) == 1 {
return errs[0]
}
return &multiError{errs}
}
if config.printIR {