2012-02-13 07:47:36 -06:00
|
|
|
// Issue #1818
|
|
|
|
|
2012-07-14 00:57:48 -05:00
|
|
|
fn lp<T>(s: ~str, f: fn(~str) -> T) -> T {
|
2012-02-13 07:47:36 -06:00
|
|
|
while false {
|
|
|
|
let r = f(s);
|
2012-08-01 19:30:05 -05:00
|
|
|
return r;
|
2012-02-13 07:47:36 -06:00
|
|
|
}
|
|
|
|
fail;
|
|
|
|
}
|
|
|
|
|
2012-07-14 00:57:48 -05:00
|
|
|
fn apply<T>(s: ~str, f: fn(~str) -> T) -> T {
|
|
|
|
fn g<T>(s: ~str, f: fn(~str) -> T) -> T {f(s)}
|
2012-06-30 18:19:07 -05:00
|
|
|
g(s, |v| { let r = f(v); r })
|
2012-02-13 07:47:36 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|