Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_ty/src/tests/simple.rs')
| -rw-r--r-- | crates/hir_ty/src/tests/simple.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/hir_ty/src/tests/simple.rs b/crates/hir_ty/src/tests/simple.rs index 31045c193c..675f9038f0 100644 --- a/crates/hir_ty/src/tests/simple.rs +++ b/crates/hir_ty/src/tests/simple.rs @@ -1750,6 +1750,18 @@ fn main() { } #[test] +fn const_eval_array_repeat_expr() { + check_types( + r#" +fn main() { + const X: usize = 6 - 1; + let t = [(); X + 2]; + //^ [(); 7] +}"#, + ); +} + +#[test] fn shadowing_primitive_with_inner_items() { check_types( r#" |