mirror of
https://github.com/golang/go
synced 2024-09-15 22:20:06 +00:00
[dev.typeparams] go/types, types2: remove instance.verify field (cleanup)
This field is not needed anymore. Follow-up on CL 335978 and CL 338097. Change-Id: I8032e5153ba65c6a4aaf6575ac6d5a15a61f1b81 Reviewed-on: https://go-review.googlesource.com/c/go/+/338098 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
c079b6baaa
commit
af903261e7
|
@ -15,7 +15,6 @@ import "cmd/compile/internal/syntax"
|
|||
type instance struct {
|
||||
pos syntax.Pos // position of type instantiation; for error reporting only
|
||||
posList []syntax.Pos // position of each targ; for error reporting only
|
||||
verify bool // if set, check constraint satisfaction upon instantiation
|
||||
}
|
||||
|
||||
// expand ensures that the underlying type of n is instantiated.
|
||||
|
|
|
@ -127,15 +127,11 @@ func (check *Checker) InstantiateLazy(pos syntax.Pos, typ Type, targs []Type, po
|
|||
tname := NewTypeName(pos, base.obj.pkg, base.obj.name, nil)
|
||||
named := check.newNamed(tname, base, nil, nil, nil) // methods and tparams are set when named is loaded.
|
||||
named.targs = targs
|
||||
named.instance = &instance{
|
||||
pos: pos,
|
||||
posList: posList,
|
||||
verify: verify,
|
||||
}
|
||||
|
||||
named.instance = &instance{pos, posList}
|
||||
if check != nil {
|
||||
check.typMap[h] = named
|
||||
}
|
||||
|
||||
return named
|
||||
}
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@ type instance struct {
|
|||
check *Checker
|
||||
pos token.Pos // position of type instantiation; for error reporting only
|
||||
posList []token.Pos // position of each targ; for error reporting only
|
||||
verify bool // if set, constraint satisfaction is verified
|
||||
}
|
||||
|
||||
// complete ensures that the underlying type of n is instantiated.
|
||||
|
|
|
@ -124,15 +124,11 @@ func (check *Checker) InstantiateLazy(pos token.Pos, typ Type, targs []Type, pos
|
|||
tname := NewTypeName(pos, base.obj.pkg, base.obj.name, nil)
|
||||
named := check.newNamed(tname, base, nil, base.TParams(), base.methods) // methods are instantiated lazily
|
||||
named.targs = targs
|
||||
named.instance = &instance{
|
||||
check: check,
|
||||
pos: pos,
|
||||
posList: posList,
|
||||
verify: verify,
|
||||
}
|
||||
named.instance = &instance{check, pos, posList}
|
||||
if check != nil {
|
||||
check.typMap[h] = named
|
||||
}
|
||||
|
||||
return named
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue