Skip to content

gccgo: erroneously accepts method expressions with named pointer types #15722

@mdempsky

Description

@mdempsky

gccgo accepts this Go source:

package x

type T int
type P *T

func (T) t() {}

func _(p P) {
        // Equivalent to "p.t()", which gccgo correctly rejects.
        P.t(p)
}

cmd/compile and gotype reject both the original source above and the suggest alternative.

/cc @ianlancetaylor

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions