tokiwa-software / fuzion

The Fuzion Language Implementation
https://fuzion-lang.dev
GNU General Public License v3.0
47 stars 11 forks source link

`n => n` causes `fz` to hang, might be good to produce a warning... #3796

Open fridis opened 2 months ago

fridis commented 2 months ago

Try this

> ./build/bin/fz -e 'n => n' 

does not finish... This is not a bug, type inference determines the result of of n to be void and tail call optimization turns this into an endless loop. Not sure if we can find a good criterion —like contains no effectful operations— to decide if an endless recursion (or an endless loop) is worth a warning.