Skip to content

cmd/compile: generate more error message for broken type #33947

@cuonglm

Description

@cuonglm

In https://go-review.googlesource.com/c/go/+/191540, @mdempsky suggest to remove this check:

e87fe0f#diff-aaf437751c6b1cd31172b7003e905499R507

With that change, gc will generate more error for test/fixedbugs/issue5172.go:

package main

type foo struct {
	x bar // ERROR "undefined"
}

func main() {
	var f foo
	go f.bar()    // GCCGO_ERROR "undefined"
	defer f.bar() // GCCGO_ERROR "undefined"
}

OTOH, the same behavior with gccgo. #5172 is long time ago and I don't get full context about it.

cc @dominikh

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions