Skip to content

go/types: missing type information in cycle detection #41669

@cuonglm

Description

@cuonglm

What version of Go are you using (go version)?

$ go version
go version devel +816ff44479 Tue Oct 8 16:41:02 2019 +0000 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env

What did you do?

package p

type I1 = interface {
	I2
}

type I2 interface {
	I1
}

What did you expect to see?

Run gotype built with go1.13.x for above program print:

issue23823.go:13:6: illegal cycle in declaration of I2
issue23823.go:13:6: 	I2 refers to
issue23823.go:9:6: 	I1 refers to
issue23823.go:13:6: 	I2

What did you see instead?

With go1.14.x, go1.15.x and tip:

issue23823.go:13:6: illegal cycle in declaration of I2
issue23823.go:13:6: 	I2 refers to
issue23823.go:13:6: 	I2

git bisect points to 37a2290

cc @griesemer @mdempsky

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

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions