2012-07-02 19:32:05 -05:00
|
|
|
// Regression test for issue #2783
|
|
|
|
|
|
|
|
fn foo(f: fn()) { f() }
|
|
|
|
|
|
|
|
fn main() {
|
2012-07-14 15:55:41 -05:00
|
|
|
~"" || 42; //~ ERROR binary operation || cannot be applied to type `~str`
|
2012-08-13 18:13:12 -05:00
|
|
|
foo || {}; //~ ERROR binary operation || cannot be applied to type `fn(fn&())`
|
2012-07-02 19:39:52 -05:00
|
|
|
//~^ NOTE did you forget the 'do' keyword for the call?
|
2012-07-02 19:32:05 -05:00
|
|
|
}
|