Open michael-kenzel opened 1 year ago
Modifying the sample to let r = &mut (*p).req;
will avoid the assertion.
But this leads to the follow up problem in:
fn test(x: &mut X) {
let mut p:&mut X = x;
// let mut r = &mut p.req;
let mut r = &mut (*p).req;
// this triggers Assertion failed: (!r || dynamic_cast<L*>(r)) && "cast not possible", file D:\Projects\anydsl\thorin\src\thorin/util/cast.h, line 42
// r.val = 3;
// this will properly update req in x
(*r).val = 3;
}
the following code will reproduce the issue:
triggers