2013-11-19 16:34:19 -08:00
|
|
|
fn foo(f: || -> !) {}
|
2013-01-08 06:21:19 -08:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
// Type inference didn't use to be able to handle this:
|
2013-10-21 13:08:31 -07:00
|
|
|
foo(|| fail!());
|
2013-01-08 06:21:19 -08:00
|
|
|
foo(|| 22); //~ ERROR mismatched types
|
|
|
|
}
|