mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-14 16:03:41 +00:00
main: fix multiple errors being reported as one
This commit is contained in:
committed by
Ron Evans
parent
141a70f401
commit
08ee1916f5
@@ -103,7 +103,10 @@ func Compile(pkgName, outpath string, spec *TargetSpec, config *BuildConfig, act
|
|||||||
|
|
||||||
// Compile Go code to IR.
|
// Compile Go code to IR.
|
||||||
errs := c.Compile(pkgName)
|
errs := c.Compile(pkgName)
|
||||||
if errs != nil {
|
if len(errs) != 0 {
|
||||||
|
if len(errs) == 1 {
|
||||||
|
return errs[0]
|
||||||
|
}
|
||||||
return &multiError{errs}
|
return &multiError{errs}
|
||||||
}
|
}
|
||||||
if config.printIR {
|
if config.printIR {
|
||||||
|
|||||||
Reference in New Issue
Block a user