- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for go116code (0.18 sec)
-
src/cmd/vendor/golang.org/x/tools/internal/typesinternal/types.go
var data [3]int // By coincidence all of these fields are ints, which simplifies things. v := reflect.ValueOf(err) for i, name := range []string{"go116code", "go116start", "go116end"} { f := v.FieldByName(name) if !f.IsValid() { return 0, 0, 0, false } data[i] = int(f.Int()) } return ErrorCode(data[0]), token.Pos(data[1]), token.Pos(data[2]), true
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 1.4K bytes - Viewed (0) -
src/go/types/api.go
Soft bool // if set, error is "soft" // go116code is a future API, unexported as the set of error codes is large // and likely to change significantly during experimentation. Tools wishing // to preview this feature may read go116code using reflection (see // errorcodes_test.go), but beware that there is no guarantee of future // compatibility. go116code Code go116start token.Pos go116end token.Pos }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 19:57:43 UTC 2024 - 17.2K bytes - Viewed (0) -
src/internal/types/errors/codes_test.go
value := int(constant.Val(obj.(*Const).Val()).(int64)) f(codename, value, spec) } } } } func readCode(err Error) int { v := reflect.ValueOf(err) return int(v.FieldByName("go116code").Int()) } func checkExample(t *testing.T, example string) error { t.Helper() fset := token.NewFileSet() if !strings.HasPrefix(example, "package") { example = "package p\n\n" + example }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 18 20:41:45 UTC 2022 - 4.9K bytes - Viewed (0) -
src/go/types/errors.go
msg = "\t" + msg } span := spanOf(posn) e := Error{ Fset: check.fset, Pos: span.pos, Msg: stripAnnotations(msg), Soft: soft, go116code: code, go116start: span.start, go116end: span.end, } if check.errpos != nil { // If we have an internal error and the errpos override is set, use it to // augment our error positioning.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 22:06:18 UTC 2024 - 8.5K bytes - Viewed (0) -
src/go/types/check_test.go
t.Errorf("%s:%d:%d: %s", filename, line, err.col, err.text) } } } } } func readCode(err Error) errors.Code { v := reflect.ValueOf(err) return errors.Code(v.FieldByName("go116code").Int()) } // boolFieldAddr(conf, name) returns the address of the boolean field conf.<name>. // For accessing unexported fields. func boolFieldAddr(conf *Config, name string) *bool {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 19:45:33 UTC 2024 - 14.1K bytes - Viewed (0)