mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-10 22:13:39 +00:00
transform: replace panics with source locations
Panics are bad for usability: whenever something breaks, the user is shown a (not very informative) backtrace. Replace it with real error messages instead, that even try to display the Go source location.
This commit is contained in:
committed by
Ron Evans
parent
25fcf3e18e
commit
26aba72729
@@ -2,9 +2,16 @@ package transform
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"tinygo.org/x/go-llvm"
|
||||
)
|
||||
|
||||
func TestInterfaceLowering(t *testing.T) {
|
||||
t.Parallel()
|
||||
testTransform(t, "testdata/interface", LowerInterfaces)
|
||||
testTransform(t, "testdata/interface", func(mod llvm.Module) {
|
||||
err := LowerInterfaces(mod)
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user