mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 11:37:46 +00:00
loader: report all type and syntax errors possible
Previously the loader would only report the first error. With this change, all syntax and type errors will be reported.
This commit is contained in:
Vendored
+3
@@ -0,0 +1,3 @@
|
||||
package typesmulti3
|
||||
|
||||
var _ int = 3.14
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
package syntaxmulti2
|
||||
|
||||
func Foo2(type) {
|
||||
}
|
||||
Vendored
+4
@@ -0,0 +1,4 @@
|
||||
package syntaxmulti1
|
||||
|
||||
func Foo1(import) {
|
||||
}
|
||||
Vendored
+17
@@ -0,0 +1,17 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "github.com/tinygo-org/tinygo/testdata/errors/multi-1"
|
||||
_ "github.com/tinygo-org/tinygo/testdata/errors/multi-2"
|
||||
_ "github.com/tinygo-org/tinygo/testdata/errors/multi-3"
|
||||
)
|
||||
|
||||
func main() {
|
||||
}
|
||||
|
||||
// ERROR: # github.com/tinygo-org/tinygo/testdata/errors/multi-2
|
||||
// ERROR: multi-2/syntax.go:3:11: expected ')', found 'type'
|
||||
// ERROR: # github.com/tinygo-org/tinygo/testdata/errors/multi-3
|
||||
// ERROR: multi-3/syntax.go:3:11: expected ')', found 'import'
|
||||
// ERROR: # github.com/tinygo-org/tinygo/testdata/errors/multi-1
|
||||
// ERROR: multi-1/types.go:3:13: cannot use 3.14 (untyped float constant) as int value in variable declaration (truncated)
|
||||
Reference in New Issue
Block a user