mirror of https://github.com/golang/go.git
go/types, types2: re-enable panic if unification stack-overflows
With all the unification/type-inference fixes in place now, we should not see stack overflows anymore. Re-enable the panic if we do overflow, so we can address those issues should they arise. Fixes #51377. Change-Id: Ied64435ea5936811504cb30bda1126c7d85980f8 Reviewed-on: https://go-review.googlesource.com/c/go/+/392755 Trust: Robert Griesemer <gri@golang.org> Reviewed-by: Robert Findley <rfindley@google.com>
This commit is contained in:
parent
3ebb1720d9
commit
efbff6e43b
|
|
@ -39,9 +39,10 @@ const (
|
|||
// due to implementation issues (e.g., see issues #48619, #48656).
|
||||
unificationDepthLimit = 50
|
||||
|
||||
// Whether to panic when unificationDepthLimit is reached. Turn on when
|
||||
// investigating infinite recursion.
|
||||
panicAtUnificationDepthLimit = false
|
||||
// Whether to panic when unificationDepthLimit is reached.
|
||||
// If disabled, a recursion depth overflow results in a (quiet)
|
||||
// unification failure.
|
||||
panicAtUnificationDepthLimit = true
|
||||
|
||||
// If enableCoreTypeUnification is set, unification will consider
|
||||
// the core types, if any, of non-local (unbound) type parameters.
|
||||
|
|
|
|||
|
|
@ -39,9 +39,10 @@ const (
|
|||
// due to implementation issues (e.g., see issues #48619, #48656).
|
||||
unificationDepthLimit = 50
|
||||
|
||||
// Whether to panic when unificationDepthLimit is reached. Turn on when
|
||||
// investigating infinite recursion.
|
||||
panicAtUnificationDepthLimit = false
|
||||
// Whether to panic when unificationDepthLimit is reached.
|
||||
// If disabled, a recursion depth overflow results in a (quiet)
|
||||
// unification failure.
|
||||
panicAtUnificationDepthLimit = true
|
||||
|
||||
// If enableCoreTypeUnification is set, unification will consider
|
||||
// the core types, if any, of non-local (unbound) type parameters.
|
||||
|
|
|
|||
Loading…
Reference in New Issue