main: fix multiple errors being reported as one
Этот коммит содержится в:
родитель
141a70f401
коммит
08ee1916f5
1 изменённых файлов: 4 добавлений и 1 удалений
5
main.go
5
main.go
|
@ -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 {
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче