]> Cypherpunks repositories - gostls13.git/commit
go/types, types2: add a const to control recursion panics in unification
authorRobert Findley <rfindley@google.com>
Wed, 2 Feb 2022 18:47:31 +0000 (13:47 -0500)
committerRobert Findley <rfindley@google.com>
Wed, 2 Feb 2022 19:37:44 +0000 (19:37 +0000)
commit77eff30ec0bc63df61ea742bb8278f92e2c133dc
tree5d152782520da197733da353bcfa96e72955a78a
parentedbe4742a296239c06cd99721bb0dbc5008d35a1
go/types, types2: add a const to control recursion panics in unification

Add a panicAtUnificationDepthLimit const to replace the use of the debug
const to control whether to panic when the unification recursion depth
is reached. Our tests should pass when debug==true.

Change-Id: I58847f49d66010bd4ca01c0408ec10acac95cba6
Reviewed-on: https://go-review.googlesource.com/c/go/+/382534
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/compile/internal/types2/unify.go
src/go/types/unify.go