Added testcase for the missing do compile note

This commit is contained in:
Armin Ronacher 2012-07-03 01:32:05 +01:00 committed by Brian Anderson
parent 5bd9d6e05c
commit 1f80b9b90a

View File

@ -0,0 +1,9 @@
// Regression test for issue #2783
fn foo(f: fn()) { f() }
fn main() {
"" || 42; //! ERROR binary operation || cannot be applied to type `str`
foo || {}; //! ERROR binary operation || cannot be applied to type `extern fn(fn())`
//!^ NOTE did you forget the 'do' keyword for the call?
}