Add two failing examples

This commit is contained in:
Sofia 2025-07-24 01:41:46 +03:00
parent 7027ee3645
commit f7500b886a
3 changed files with 28 additions and 0 deletions

12
examples/list_hard.reid Normal file
View File

@ -0,0 +1,12 @@
fn main() {
let mut a = 5;
for i in 0..1000 {
for j in 0..1000 {
for k in 0..1000 {
inner(&mut a);
}
}
}
}
fn inner(a: &mut i32) {}

8
examples/ptr_hard.reid Normal file
View File

@ -0,0 +1,8 @@
fn main() {
let mut a = 5;
inner(&mut a);
}
fn inner(a: &mut i32) {
*a = *a + 1;
}

View File

@ -124,3 +124,11 @@ fn struct_compiles_well() {
fn loops_compiles_well() {
test(include_str!("../../examples/loops.reid"), "test", 10);
}
#[test]
fn ptr_hard_compiles_well() {
test(include_str!("../../examples/ptr_hard.reid"), "test", 0);
}
#[test]
fn list_hard_compiles_well() {
test(include_str!("../../examples/list_hard.reid"), "test", 0);
}