Skip to content

cmd/compile: cannot convert uint to uintptr #13263

@dvyukov

Description

@dvyukov

cmd/compile fails on the following correct program:

package b

var (
    w []*uint
    x = *w[0]
    y = x
    z = (uintptr)(y)
)
./go.go:7: cannot use x (type uint) as type uintptr in assignment

gotype eats it.

go version devel +25a28da Sun Nov 15 23:41:28 2015 +0000 linux/amd64

Found with GoSmith (https://github.com/dvyukov/gosmith).

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