Three random test cases that seem to produce more errors now. I've

not dug deeply into what is going on here, although the errors ARE
somewhat surprising.
This commit is contained in:
Niko Matsakis 2014-12-18 22:17:16 -05:00
parent a04ce71172
commit ebf1e4f23a
3 changed files with 8 additions and 2 deletions

View File

@ -10,7 +10,10 @@
fn main() {
return
{ return () } //~ ERROR the type of this value must be known in this context
{ return () }
//~^ ERROR the type of this value must be known in this context
//~| ERROR this function takes 1 parameter
//~| ERROR mismatched types
()
;
}

View File

@ -13,7 +13,9 @@ type Transducer<'t, R, T, U> = |Step<'t, R, U>|: 't -> Step<'t, R, T>;
fn mapping<'f, R, T, U>(f: |T|: 'f -> U) -> &'f Transducer<'f, R, T, U> {
|step| |r, x|
step(r, f(x)) //~ ERROR the type of this value must be known in this context
step(r, f(x))
//~^ ERROR the type of this value must be known in this context
//~| ERROR this function takes 1 parameter but 2 parameters were supplied
}
fn main() {}

View File

@ -17,4 +17,5 @@
fn main() {
(return)((),());
//~^ ERROR the type of this value must be known
//~| ERROR this function takes 1 parameter
}