shfty-elysian / elysian-legacy

Field function compiler
0 stars 0 forks source link

Safe downcasting for primitive numeric types #111

Open Shfty opened 1 year ago

Shfty commented 1 year ago

Currently, f64 -> f32 is done via as, which causes inf in cases where the value exceeds f32::MAX.

This causes the syn backend to fail, as numbers are parsed textually, and 'inff32' is not a valid f32.