package main
type S struct {
- err os.Error // ERROR "undefined|expected package"
+ err foo.Bar // ERROR "undefined|expected package"
Num int
}
func main() {
s := S{}
- _ = s.Num // no error here please
+ _ = s.Num // no error here please
}
import (
"fmt"
"math"
+ "runtime"
"strings"
)
-type Error interface {
- String() string
-}
-
type ErrorTest struct {
name string
fn func()
func error(fn func()) (error string) {
defer func() {
if e := recover(); e != nil {
- error = e.(Error).String()
+ error = e.(runtime.Error).String()
}
}()
fn()