Concrete is a simple programming language specifically crafted for creating highly scalable systems that are reliable, efficient, and easy to maintain.
Apache License 2.0
123
stars
11
forks
source link
The compiler doesn't behave the same way when a function does not returns a value #129
Running mainOk returns a meaning message (Uncomment mainOk)
[UnexpectedType] Error: expected type i32.
╭─[bugWithOpResult.con:14:3]
│
12 │ fn mainOk() -> i32 {
│ ─┬─
│ ╰─── expected 'i32' due to this type
│
14 │ return function_wo_return(&value);
│ ────────────────┬────────────────
│ ╰────────────────── Unexpected type '()', expected 'i32'
Running mainBad panics the compiler. It should return something similiar to mainOk but the output is
Compiling bugWithOpResult (bugWithOpResult.con)
error: 'llvm.load' op result #0 must be LLVM type with size, but got 'none'
thread 'main' panicked at crates/concrete_codegen_mlir/src/context.rs:83:9:
assertion failed: melior_module.as_operation().verify()
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Running mainOk returns a meaning message (Uncomment mainOk)
Running mainBad panics the compiler. It should return something similiar to mainOk but the output is