Skip to content

cmd/compile: crash on interface embedding cycles if a type alias is used #23823

Closed
@zigo101

Description

@zigo101

Please answer these questions before submitting your issue. Thanks!

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

go version go1.10rc2 linux/amd64

What did you do?

package main

type I = interface {
	I2
}

type I2 interface {
	I
}

func main() {
}

What did you expect to see?

Compiler doesn't crash. An error message should be printed.

What did you see instead?

Compiler crashes.

# command-line-arguments
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x9fec2c]

goroutine 1 [running]:
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    FrozenDueToAgeNeedsFixThe path to resolution is known, but the work has not been done.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions