aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/ty/tests.rs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-01-26 21:41:27 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-01-26 21:41:27 +0000
commite40d8d40321b191ee82b8b07910f8a0898c8914c (patch)
tree7adcdf5fd1a09bdb18776e210a4686342979cbe6 /crates/ra_hir/src/ty/tests.rs
parent99b032b0f6b3f718ee9500655f1149dc33eac610 (diff)
parent619af1e22cb71b981fde4cedbf6ebce9b3488028 (diff)
Merge #683
683: fix AST for if expressions r=matklad a=matklad Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/ty/tests.rs')
-rw-r--r--crates/ra_hir/src/ty/tests.rs17
1 files changed, 17 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs
index e0b0689f8..e1165f682 100644
--- a/crates/ra_hir/src/ty/tests.rs
+++ b/crates/ra_hir/src/ty/tests.rs
@@ -285,6 +285,23 @@ fn test() {
285} 285}
286 286
287#[test] 287#[test]
288fn infer_in_elseif() {
289 check_inference(
290 "infer_in_elseif",
291 r#"
292struct Foo { field: i32 }
293fn main(foo: Foo) {
294 if true {
295
296 } else if false {
297 foo.field
298 }
299}
300"#,
301 )
302}
303
304#[test]
288fn infer_inherent_method() { 305fn infer_inherent_method() {
289 check_inference( 306 check_inference(
290 "infer_inherent_method", 307 "infer_inherent_method",