aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir/src/ty/tests.rs')
-rw-r--r--crates/ra_hir/src/ty/tests.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs
index 97c466890..1650606b7 100644
--- a/crates/ra_hir/src/ty/tests.rs
+++ b/crates/ra_hir/src/ty/tests.rs
@@ -157,11 +157,18 @@ impl S {
157fn infer_boolean_op() { 157fn infer_boolean_op() {
158 check_inference( 158 check_inference(
159 r#" 159 r#"
160fn f(x: bool) -> i32 {
161 0i32
162}
163
160fn test() { 164fn test() {
161 let x = a && b; 165 let x = a && b;
162 let y = true || false; 166 let y = true || false;
163 let z = x == y; 167 let z = x == y;
164 let h = CONST_1 <= CONST_2; 168 let h = CONST_1 <= CONST_2;
169 let c = f(z || y) + 5;
170 let d = b;
171 let e = 3i32 && "hello world";
165 172
166 10 < 3 173 10 < 3
167} 174}