There's a func assert in cmd/compile/internal/noder with a TODO to remove.
(It would be a bad experience for users to hit the panic instead of a good error message.)
It's only reachable in the generics implementation, so it doesn't need to be
removed until Go 1.18. Filing this issue to make sure we remember.
The text was updated successfully, but these errors were encountered:
@mdempsky@danscales I've looked at the noder code but I'm not sure what there is to do here. This can't be about removing all asserts, and I didn't see an obvious TODO related to a specific assert in a quick search.
I think Russ is saying we should remove the Assert function and all its uses eventually (possibly replacing many of them with a panic with an error message). Maybe we can check with him again on this. In any case, I think we can wait on this until near the end of the release cycle.
There's base.Assertf now, so we can more easily include more details in the panic message. But in general, the asserts in noder are being used like the asserts in types2: as extra consistency checks that should never fail; or if they do, then the error message isn't going to be actionable by end users anyway.