*: misc fixes for go1.23 (#3663)

- skip staticcheck on go1.23 for now
- fix reading interface values in go1.23
- sync list of waitreasons from go1.23
This commit is contained in:
Alessandro Arzilli
2024-02-22 20:35:15 +01:00
committed by GitHub
parent ff2f69343e
commit 5bd835a801
5 changed files with 22 additions and 12 deletions

View File

@ -459,7 +459,9 @@ func addCheckVarType(V, T string, pos token.Pos) {
}
func addCheckFieldType(S, F, T string, opt bool, pos token.Pos) {
checkFieldTypeRules[S] = append(checkFieldTypeRules[S], &checkFieldType{S, F, T, opt, pos})
if !strings.Contains(S, "|") {
checkFieldTypeRules[S] = append(checkFieldTypeRules[S], &checkFieldType{S, F, T, opt, pos})
}
}
func addCheckConstVal(C string, V constant.Value, pos token.Pos) {
@ -547,7 +549,6 @@ func check() {
allok := true
for _, rule := range checkVarTypeRules {
//TODO: implement
pos := fset.Position(rule.pos)
def := lookupPackage(pkgmap, "runtime").Types.Scope().Lookup(rule.V)
if def == nil {