aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/tests
diff options
context:
space:
mode:
authorMarcus Klaas de Vries <[email protected]>2019-01-06 20:39:36 +0000
committerMarcus Klaas de Vries <[email protected]>2019-01-06 21:17:54 +0000
commit82d9a77dade454ee8d09f198fa839e7755ff7bfb (patch)
tree791b3c0ee6069a06896c815795ff7e86877887df /crates/ra_hir/src/ty/tests
parent4fc233a02e8dc07619a969400c445ec47c2b1a9d (diff)
Touch up type inference for boolean operators
Also try to infer its subexpressions and set type expectations whenever possible.
Diffstat (limited to 'crates/ra_hir/src/ty/tests')
-rw-r--r--crates/ra_hir/src/ty/tests/data/0008_boolean_op.txt41
1 files changed, 31 insertions, 10 deletions
diff --git a/crates/ra_hir/src/ty/tests/data/0008_boolean_op.txt b/crates/ra_hir/src/ty/tests/data/0008_boolean_op.txt
index cc07cdccb..ca01ad159 100644
--- a/crates/ra_hir/src/ty/tests/data/0008_boolean_op.txt
+++ b/crates/ra_hir/src/ty/tests/data/0008_boolean_op.txt
@@ -1,10 +1,31 @@
1[21; 22) 'x': bool 1[28; 32) '0i32': i32
2[68; 69) 'z': bool 2[22; 34) '{ 0i32 }': i32
3[72; 78) 'x == y': bool 3[6; 7) 'x': [unknown]
4[45; 58) 'true || false': bool 4[127; 134) 'CONST_1': [unknown]
5[11; 125) '{ ... < 3 }': bool 5[201; 205) '3i32': bool
6[117; 123) '10 < 3': bool 6[76; 77) 'y': bool
7[88; 89) 'h': bool 7[65; 66) 'b': bool
8[41; 42) 'y': bool 8[60; 66) 'a && b': bool
9[92; 110) 'CONST_...ONST_2': bool 9[127; 145) 'CONST_...ONST_2': bool
10[25; 31) 'a && b': bool 10[182; 183) 'd': [unknown]
11[229; 231) '10': [unknown]
12[209; 222) '"hello world"': bool
13[229; 235) '10 < 3': bool
14[186; 187) 'b': [unknown]
15[159; 172) 'f(z || y) + 5': [unknown]
16[56; 57) 'x': bool
17[112; 113) 'y': bool
18[201; 222) '3i32 &...world"': bool
19[234; 235) '3': [unknown]
20[138; 145) 'CONST_2': [unknown]
21[80; 93) 'true || false': bool
22[46; 237) '{ ... < 3 }': bool
23[197; 198) 'e': bool
24[107; 113) 'x == y': bool
25[88; 93) 'false': bool
26[80; 84) 'true': bool
27[123; 124) 'h': bool
28[155; 156) 'c': [unknown]
29[103; 104) 'z': bool
30[60; 61) 'a': bool
31[107; 108) 'x': bool