diff options
Diffstat (limited to 'tests/ui/expr/if/if-typeck.rs')
-rw-r--r-- | tests/ui/expr/if/if-typeck.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/expr/if/if-typeck.rs b/tests/ui/expr/if/if-typeck.rs new file mode 100644 index 000000000..d8c262bd6 --- /dev/null +++ b/tests/ui/expr/if/if-typeck.rs @@ -0,0 +1,10 @@ +// error-pattern:mismatched types +// issue #513 + +fn f() { } + +fn main() { + + // f is not a bool + if f { } +} |