diff options
Diffstat (limited to 'src/go/types/check_test.go')
-rw-r--r-- | src/go/types/check_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/go/types/check_test.go b/src/go/types/check_test.go index 0f4c320a47..cda052f4d3 100644 --- a/src/go/types/check_test.go +++ b/src/go/types/check_test.go @@ -39,6 +39,7 @@ import ( "go/scanner" "go/token" "internal/testenv" + "internal/types/errors" "os" "path/filepath" "reflect" @@ -295,9 +296,9 @@ func testFiles(t *testing.T, sizes Sizes, filenames []string, srcs [][]byte, man } } -func readCode(err Error) int { +func readCode(err Error) errors.Code { v := reflect.ValueOf(err) - return int(v.FieldByName("go116code").Int()) + return errors.Code(v.FieldByName("go116code").Int()) } // boolFieldAddr(conf, name) returns the address of the boolean field conf.<name>. |