diff options
author | Marcus Klaas de Vries <[email protected]> | 2019-01-14 22:15:16 +0000 |
---|---|---|
committer | Marcus Klaas de Vries <[email protected]> | 2019-01-15 23:04:39 +0000 |
commit | a2b6d3da30020421c97100d7c8699a3b4f8cd6fb (patch) | |
tree | f38fafe9cbc4efea5574afa6c40a0fea403bf34c /crates/ra_hir/src/ty/tests | |
parent | ab46f8abf195a78c018d8b23896eb920d16b028b (diff) |
Implement rudimentary type inference for unary operators
Diffstat (limited to 'crates/ra_hir/src/ty/tests')
-rw-r--r-- | crates/ra_hir/src/ty/tests/data/unary_op.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests/data/unary_op.txt b/crates/ra_hir/src/ty/tests/data/unary_op.txt new file mode 100644 index 000000000..203022e82 --- /dev/null +++ b/crates/ra_hir/src/ty/tests/data/unary_op.txt | |||
@@ -0,0 +1,28 @@ | |||
1 | [27; 28) 'x': SomeType | ||
2 | [40; 197) '{ ...lo"; }': () | ||
3 | [50; 51) 'b': bool | ||
4 | [54; 59) 'false': bool | ||
5 | [69; 70) 'c': bool | ||
6 | [73; 75) '!b': bool | ||
7 | [74; 75) 'b': bool | ||
8 | [85; 86) 'a': i128 | ||
9 | [89; 92) '100': i128 | ||
10 | [102; 103) 'd': i128 | ||
11 | [112; 114) '-a': i128 | ||
12 | [113; 114) 'a': i128 | ||
13 | [124; 125) 'e': i32 | ||
14 | [128; 132) '-100': i32 | ||
15 | [129; 132) '100': i32 | ||
16 | [142; 143) 'f': bool | ||
17 | [146; 153) '!!!true': bool | ||
18 | [147; 153) '!!true': bool | ||
19 | [148; 153) '!true': bool | ||
20 | [149; 153) 'true': bool | ||
21 | [159; 164) '-3.14': f64 | ||
22 | [160; 164) '3.14': f64 | ||
23 | [170; 172) '-x': [unknown] | ||
24 | [171; 172) 'x': SomeType | ||
25 | [178; 180) '!x': [unknown] | ||
26 | [179; 180) 'x': SomeType | ||
27 | [186; 194) '-"hello"': [unknown] | ||
28 | [187; 194) '"hello"': &str | ||