Skip to content

cmd/compile: spurious invalid recursive type #57176

Closed

Description

@philhofer

The following compiles fine on go1.19.3 and fails on go1.19.4:

~ $ cat test.go
package main

import "sync/atomic"

type tree struct {
    links [2]atomic.Pointer[tree]
}

func main() {

}
~$ go run test.go
~$ go version
go version go1.19.3 linux/amd64

And on go1.19.4:

~ $ go run test.go
# command-line-arguments
./test.go:5:6: invalid recursive type tree
        ./test.go:5:6: tree refers to
        ./test.go:6:20: atomic.Pointer refers to
        ./test.go:5:6: tree
~ $ go version
go version go1.19.4 linux/amd64

Activity

  1. philhofer commented on Dec 8, 2022

    @philhofer
    ContributorAuthor

    Ah, I see this is a duplicate of #57124; closing. Sorry for the noise.

  2. locked and limited conversation to collaborators on Dec 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions