rustboot: Emit an error instead of asserting in trans when a T is passed by value

This commit is contained in:
Patrick Walton 2010-10-28 15:02:00 -07:00
parent 429964b439
commit ee901858a2
2 changed files with 21 additions and 2 deletions

View file

@ -12,7 +12,7 @@ tag list[T] {
nil;
}
fn foldl[T,U](&list[T] ls, U u, fn(&T t, U u) -> U f) -> U {
fn foldl[T,U](&list[T] ls, &U u, fn(&T t, U u) -> U f) -> U {
alt(ls) {
case (cons[T](?hd, ?tl)) {
auto u_ = f(hd, u);