SPWN-language icon indicating copy to clipboard operation
SPWN-language copied to clipboard

Optimizer Bug (AKA "frames() bug")

Open SpeckyYT opened this issue 2 years ago • 1 comments

if runtime_condition { runtime_operation }
trigger_func!

This causes the optimizer to panic with the following error:

Built in 781 milliseconds!
Optimizing triggers...
thread 'main' panicked at 'assertion failed: swaps.insert(a, b).is_none()', optimizer\src\optimize.rs:857:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I don't think it's fully an optimizer issue tho.

SpeckyYT avatar May 24 '22 16:05 SpeckyYT

if 1i == 0 {}
!{ 1i.add(1) }!

This is one of the shortest examples I found that throws that error.

SpeckyYT avatar May 24 '22 16:05 SpeckyYT