fix parameter access of sret functions

This commit is contained in:
Andrew Kelley
2016-01-24 19:27:12 -07:00
parent 419652ee8f
commit f5cc7f65a3
5 changed files with 24 additions and 27 deletions

View File

@@ -1242,14 +1242,14 @@ struct Foo {
x: i32,
y: i32,
}
fn make_foo() Foo => {
fn make_foo(x: i32, y: i32) Foo => {
Foo {
.x = 1234,
.y = 5678,
.x = x,
.y = y,
}
}
pub fn main(args: [][]u8) %void => {
const foo = make_foo();
const foo = make_foo(1234, 5678);
if (foo.y != 5678) {
print_str("BAD\n");
}