mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-07-26 14:48:40 +00:00
04d1261f8a
This improves error reporting slightly.
20 lines
386 B
Go
20 lines
386 B
Go
package main
|
|
|
|
import "runtime/interrupt"
|
|
|
|
var num = 5
|
|
|
|
func main() {
|
|
// Error coming from LowerInterrupts.
|
|
interrupt.New(num, func(interrupt.Interrupt) {
|
|
})
|
|
|
|
// 2nd error
|
|
interrupt.New(num, func(interrupt.Interrupt) {
|
|
})
|
|
}
|
|
|
|
// ERROR: # command-line-arguments
|
|
// ERROR: optimizer.go:9:15: interrupt ID is not a constant
|
|
// ERROR: optimizer.go:13:15: interrupt ID is not a constant
|