Spu7Nix / SPWN-language

A language for Geometry Dash triggers
MIT License
1.06k stars 61 forks source link

Optimizer Bug (AKA "frames() bug") #258

Open SpeckyYT opened 2 years ago

SpeckyYT commented 2 years ago
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 commented 2 years ago
if 1i == 0 {}
!{ 1i.add(1) }!

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