You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cmd/compile/internal/types2: clean up panics in instantiation
Clean up a few issues related to panicking during invalid instantiation.
- Panic early in instantiateLazy when check == nil and verify == true.
Otherwise, we would panic at check.later.
- Always panic when check == nil and verify == true, even if targs is
of incorrect length. This is more consistent behavior.
- Lift the check for len(posList) <= len(targs) out of
Checker.instantiate. This is the only reason why posList is passed to
that function, and doing this allows us to eliminate posList from
instance. At this point instance is close to being unnecessary, so
update a TODO to this effect.
Change-Id: Id5f44cbb1a5897aef10ce2a573aa78acd7ae4026
Reviewed-on: https://go-review.googlesource.com/c/go/+/341862
Trust: Robert Findley <[email protected]>
Run-TryBot: Robert Findley <[email protected]>
TryBot-Result: Go Bot <[email protected]>
Reviewed-by: Robert Griesemer <[email protected]>
0 commit comments