Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

concrete code which should build but panics #143

Open
kenarab opened this issue Jun 19, 2024 · 0 comments
Open

concrete code which should build but panics #143

kenarab opened this issue Jun 19, 2024 · 0 comments

Comments

@kenarab
Copy link
Collaborator

kenarab commented Jun 19, 2024

Running in linear-checker branch

git checkout linear-checker
 cargo r build examples/linearExample01fail.con --check 

Included in examples but not in tests, as it is not working

mod LinearExampleStub {

	struct Linear {
	    x: i32,
	    y: i32,
	}
	

	fn main() -> i32 {
		let mut xy: Linear = 
                    Linear {
                        x: 1,
                        y: 0,
                    };
		if true { //if true because current stage of the AST does not support an anonymous block
			// xy is "consumed". _consume has Linear type and goes out of scope
			let _consume: Linear = xy;
            //FIXME this code is not compiling in concrete seems to be because a problem in lowering with variables defined inside a block
		}
		return xy.x;
	}				
}
2024-06-19T19:05:48.106908Z DEBUG concrete_driver: Output file: "/Users/kenarab/git/concrete-ab/linearExample01fail.o"
2024-06-19T19:05:48.106914Z DEBUG concrete_driver: Is library: false
2024-06-19T19:05:48.106917Z DEBUG concrete_driver: Optlevel: None
2024-06-19T19:05:48.106919Z DEBUG concrete_driver: Debug Info: Full
2024-06-19T19:05:48.107155Z DEBUG concrete_ir::lowering::prepass: running ir prepass on module DefId { program_id: 0, id: 1 }
thread 'main' panicked at crates/concrete_ir/src/lowering.rs:800:76:
no local_idx
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant