]> Cypherpunks repositories - gostls13.git/commit
internal/types: add test for cycles in value context
authorMark Freeman <mark@golang.org>
Wed, 7 Jan 2026 21:40:53 +0000 (16:40 -0500)
committerGopher Robot <gobot@golang.org>
Thu, 8 Jan 2026 16:31:50 +0000 (08:31 -0800)
commit5facb3b24b1c388176572eb95239f94d6ed4017d
treef51a8e3d293fec3a323d2077baaf1f2a1698c343
parent28147b528312055b535c6a69d0d4492bd502e1b0
internal/types: add test for cycles in value context

Exposition is also added to outline a difference between syntax which
can / cannot produce values of incomplete types.

For us to enforce non-nilness of type RHS and remove the pending type
mechanism, I suspect we would need to add completeness guards to
the syntax which *can*.

Enforcing non-nilness of type RHS currently breaks the below test
cases, but I suspect that is simply an implementation artifact.
In other words, they just call Underlying at a bad time.

  - T0
  - T3
  - T6 / T7
  - T10
  - T12

If we also remove pendingType, all of these test cases break; again,
we would need guards in the appropriate syntax logic.

Change-Id: Ibe22042232e542de1d38b923dd1d5cc50dce08cb
Reviewed-on: https://go-review.googlesource.com/c/go/+/734600
TryBot-Bypass: Mark Freeman <markfreeman@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Auto-Submit: Mark Freeman <markfreeman@google.com>
src/internal/types/testdata/check/cycles6.go [new file with mode: 0644]