Add tests and fix pexp bug. Closes #141.
This commit is contained in:
parent
559e1e7e01
commit
1fc4e9fcc6
4 changed files with 28 additions and 2 deletions
|
@ -381,11 +381,13 @@ TASK_XFAILS := test/run-pass/acyclic-unwind.rs \
|
||||||
test/run-pass/task-comm-9.rs \
|
test/run-pass/task-comm-9.rs \
|
||||||
test/run-pass/task-comm.rs \
|
test/run-pass/task-comm.rs \
|
||||||
test/run-pass/threads.rs \
|
test/run-pass/threads.rs \
|
||||||
test/run-pass/yield.rs
|
test/run-pass/yield.rs
|
||||||
|
|
||||||
TEST_XFAILS_X86 := $(TASK_XFAILS) \
|
TEST_XFAILS_X86 := $(TASK_XFAILS) \
|
||||||
test/run-pass/bind-obj-ctor.rs \
|
test/run-pass/bind-obj-ctor.rs \
|
||||||
|
test/run-pass/child-outlives-parent.rs \
|
||||||
test/run-pass/clone-with-exterior.rs \
|
test/run-pass/clone-with-exterior.rs \
|
||||||
|
test/run-pass/constrained-type.rs \
|
||||||
test/run-pass/obj-as.rs \
|
test/run-pass/obj-as.rs \
|
||||||
test/run-pass/vec-slice.rs \
|
test/run-pass/vec-slice.rs \
|
||||||
test/run-pass/fn-lval.rs \
|
test/run-pass/fn-lval.rs \
|
||||||
|
@ -424,10 +426,12 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
|
||||||
box-in-tup.rs \
|
box-in-tup.rs \
|
||||||
box-unbox.rs \
|
box-unbox.rs \
|
||||||
cast.rs \
|
cast.rs \
|
||||||
|
child-outlives-parent.rs \
|
||||||
clone-with-exterior.rs \
|
clone-with-exterior.rs \
|
||||||
comm.rs \
|
comm.rs \
|
||||||
command-line-args.rs \
|
command-line-args.rs \
|
||||||
complex.rs \
|
complex.rs \
|
||||||
|
constrained-type.rs \
|
||||||
deep.rs \
|
deep.rs \
|
||||||
deref.rs \
|
deref.rs \
|
||||||
destructor-ordering.rs \
|
destructor-ordering.rs \
|
||||||
|
|
|
@ -121,7 +121,7 @@ and parse_carg_base (ps:pstate) : Ast.carg_base =
|
||||||
|
|
||||||
and parse_carg (ps:pstate) : Ast.carg =
|
and parse_carg (ps:pstate) : Ast.carg =
|
||||||
match peek ps with
|
match peek ps with
|
||||||
IDENT _ ->
|
IDENT _ | STAR ->
|
||||||
begin
|
begin
|
||||||
let base = Ast.CARG_base (parse_carg_base ps) in
|
let base = Ast.CARG_base (parse_carg_base ps) in
|
||||||
let path =
|
let path =
|
||||||
|
|
8
src/test/run-pass/child-outlives-parent.rs
Normal file
8
src/test/run-pass/child-outlives-parent.rs
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
// Reported as issue #126, child leaks the string.
|
||||||
|
|
||||||
|
fn child2(str s) {
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
auto x = spawn child2("hi");
|
||||||
|
}
|
14
src/test/run-pass/constrained-type.rs
Normal file
14
src/test/run-pass/constrained-type.rs
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
// -*- rust -*-
|
||||||
|
|
||||||
|
// Reported as issue #141, as a parse error. Ought to work in full though.
|
||||||
|
|
||||||
|
type list = tag(cons(int,@list), nil());
|
||||||
|
type bubu = rec(int x, int y);
|
||||||
|
|
||||||
|
|
||||||
|
fn less_than(int x, int y) -> bool { ret x < y; }
|
||||||
|
|
||||||
|
type ordered_range = rec(int low, int high) : less_than(*.low, *.high);
|
||||||
|
|
||||||
|
fn main() {
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue