Add tests and fix pexp bug. Closes #141.

This commit is contained in:
Graydon Hoare 2010-08-03 12:20:29 -07:00
parent 559e1e7e01
commit 1fc4e9fcc6
4 changed files with 28 additions and 2 deletions

View File

@ -381,11 +381,13 @@ TASK_XFAILS := test/run-pass/acyclic-unwind.rs \
test/run-pass/task-comm-9.rs \
test/run-pass/task-comm.rs \
test/run-pass/threads.rs \
test/run-pass/yield.rs
test/run-pass/yield.rs
TEST_XFAILS_X86 := $(TASK_XFAILS) \
test/run-pass/bind-obj-ctor.rs \
test/run-pass/child-outlives-parent.rs \
test/run-pass/clone-with-exterior.rs \
test/run-pass/constrained-type.rs \
test/run-pass/obj-as.rs \
test/run-pass/vec-slice.rs \
test/run-pass/fn-lval.rs \
@ -424,10 +426,12 @@ TEST_XFAILS_LLVM := $(TASK_XFAILS) \
box-in-tup.rs \
box-unbox.rs \
cast.rs \
child-outlives-parent.rs \
clone-with-exterior.rs \
comm.rs \
command-line-args.rs \
complex.rs \
constrained-type.rs \
deep.rs \
deref.rs \
destructor-ordering.rs \

View File

@ -121,7 +121,7 @@ and parse_carg_base (ps:pstate) : Ast.carg_base =
and parse_carg (ps:pstate) : Ast.carg =
match peek ps with
IDENT _ ->
IDENT _ | STAR ->
begin
let base = Ast.CARG_base (parse_carg_base ps) in
let path =

View File

@ -0,0 +1,8 @@
// Reported as issue #126, child leaks the string.
fn child2(str s) {
}
fn main() {
auto x = spawn child2("hi");
}

View 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() {
}