Skip to content

cmd/compile: internal compiler error: expected struct { int } value to have type struct { int }  #50190

@zigo101

Description

@zigo101

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

$ go version
go version go1.18beta1 linux/amd64

Does this issue reproduce with the latest release?

In 1.18 beta 1, not in 1.17.5,

What did you do?

package main

type Int = int

type A = struct{ int }
type B = struct{ Int }

func main() {
	var x, y interface{} = A{}, B{}
	println(x == y) // true
}

What did you expect to see?

compiles okay

What did you see instead?

crashes compiler

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions