Passing pointers should always pass Pointer class, not Int class, etc. #752

Closed
nddrylliog opened this Issue Dec 6, 2013 · 1 comment

Projects

None yet

1 participant

@nddrylliog
Member

Test case:

check: func <T> (t: T) {
    if (T size != Pointer size) {
        "Fail! T size should be #{Pointer size}, is #{T size}" println()
        exit(1)
    }
}

main: func {
    a: Int*
    check(a)

    b: UInt64*
    check(b)

    c: Char*
    check(c)
}

On 64-bit, it fails at the first check.

@nddrylliog nddrylliog was assigned Dec 6, 2013
@nddrylliog nddrylliog added a commit that referenced this issue Dec 6, 2013
@nddrylliog nddrylliog Closes #752, closes #751 be949a4
@nddrylliog
Member

Again, ugly code, but it works.

@nddrylliog nddrylliog closed this Dec 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment