Skip to content

Generic vector reads read from the wrong place #301

Description

@pcwalton

Test case:

fn get[T](vec[T] v) -> T {
    ret v.(1);
}

fn main() {
    auto v = vec(1, 2, 3, 4, 5);
    log get(v);
}

Result:

[pwalton@fireferret ~/Source/rust/build] ./a.out
rt: ---
rt: 12ed:main:main:                       rust: 33554432 (0x2000000)

ret v.(0) works, so looks like we're miscalculating vec element size.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions