minirust icon indicating copy to clipboard operation
minirust copied to clipboard

minimize: Coercion of `FnPtr` bug

Open bifbof opened this issue 8 months ago • 1 comments

fn f() {}

fn main() {
    let _p = f as fn();
}

The local _p is translated to type Ptr(FnPtr(Rust)) while f as fn() is translated to type Ptr(FnPtr(C)) leading to a panic in well-formedness check as right and left type of assign statement have different types.

This is the output:

fatal error: program not well-formed (this is a bug in minimize):
    Statement::Assign: destination and source type differ

bifbof avatar Jun 20 '24 14:06 bifbof