Files
moxa/_test/method35.go
Nicholas Wiersma 3640f2f820 feat: add type assertion expression type checking
This adds type checking to TypeAssertExpr. In order to allow for this, method types now have a receiver type in both reflect and native cases.
2020-08-20 17:06:05 +02:00

15 lines
179 B
Go

package main
import "strconv"
func main() {
var err error
_, err = strconv.Atoi("erwer")
if _, ok := err.(*strconv.NumError); ok {
println("here")
}
}
// Output:
// here