Skip to content

go/types, types2: missing error for invalid cycle in function declaration #43215

@findleyr

Description

@findleyr

The following invalid cycle is currently detected by the compiler with the error "typechecking loop involving f".

func f([unsafe.Sizeof(f)]int) {}

https://play.golang.org/p/cfAFJHgsAkX

However no error is detected by go/types, both at master and in the dev.typeparams branch (where there have been some changes to cycle detection in function declarations).

CC @griesemer

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions