Jacajack / hdl

A proof-of-concept, Rust-inspired, declarative hardware description language optimized for RTL coding
MIT License
17 stars 1 forks source link

[panic] Generic ternary operator width mismatch #432

Closed Jacajack closed 10 months ago

Jacajack commented 11 months ago

Input

module X{}
impl X{
    const ubus<(1u1 ? 1u1 : 0u64)> a_9;
}
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: EvalError(InvalidExpression(WidthMismatch))', hdllang/src/analyzer/variable.rs:208:38
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Would be nice if this was checked by the analyzer as a part of the generic math revamp (#348)