Skip to content

go.tools/go/types: error checking conversions to uintptr #6326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kisielk opened this issue Sep 4, 2013 · 2 comments
Closed

go.tools/go/types: error checking conversions to uintptr #6326

kisielk opened this issue Sep 4, 2013 · 2 comments

Comments

@kisielk
Copy link
Contributor

kisielk commented Sep 4, 2013

What steps will reproduce the problem?

func TestIssueXXXX(t *testing.T) {
    src := `
package main

import "unsafe"

type t unsafe.Pointer

func main() {
    var x t
    var y = uintptr(x)
}
`
    f, err := parser.ParseFile(fset, "", src, 0)
    if err != nil {
        t.Fatal(err)
    }

    _, err = Check(f.Name.Name, fset, []*ast.File{f})
    if err != nil {
        t.Fatal("error in Check:", err)
    }
}

What is the expected output?
No error

What do you see instead?
issues_test.go:125: error in Check: 10:18: cannot convert invalid operand to uintptr

Which compiler are you using (5g, 6g, 8g, gccgo)?
8g

Which operating system are you using?
Ubuntu raring

Which version are you using?  (run 'go version')
go version devel +a71616f65cb1 Tue Sep 03 21:23:52 2013 -0700 linux/amd64
@robpike
Copy link
Contributor

robpike commented Sep 5, 2013

Comment 1:

Labels changed: added priority-soon, removed priority-triage.

Owner changed to @griesemer.

Status changed to Accepted.

@griesemer
Copy link
Contributor

Comment 2:

This issue was closed by revision golang/tools@6688b01.

Status changed to Fixed.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants