Add a test for mismatched types when comparing functions
This commit is contained in:
parent
eb0d56f8c5
commit
51d07830ba
8
src/test/compile-fail/fn-compare-mismatch.rs
Normal file
8
src/test/compile-fail/fn-compare-mismatch.rs
Normal file
@ -0,0 +1,8 @@
|
||||
// xfail-stage0
|
||||
// error-pattern:expected fn() but found fn(int)
|
||||
|
||||
fn main() {
|
||||
fn f() {}
|
||||
fn g(int i) {}
|
||||
auto x = f == g;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user