Consider unop deref as an lval. Un-XFAIL vec-push.
This commit is contained in:
parent
f2fe26a821
commit
e300b8047f
@ -1958,6 +1958,7 @@ fn is_lval(@ast.expr expr) -> bool {
|
||||
case (ast.expr_field(_,_,_)) { ret true; }
|
||||
case (ast.expr_index(_,_,_)) { ret true; }
|
||||
case (ast.expr_path(_,_,_)) { ret true; }
|
||||
case (ast.expr_unary(ast.deref,_,_)) { ret true; }
|
||||
case (_) { ret false; }
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,9 @@
|
||||
// xfail-stage0
|
||||
|
||||
fn push[T](&mutable vec[mutable? T] v, &T t) {
|
||||
v += vec(t);
|
||||
}
|
||||
|
||||
fn main() {
|
||||
auto v = @vec(1, 2, 3);
|
||||
push(*v, 1);
|
||||
push[int](*v, 1);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user