Stream: compiler development

Topic: Try-unwrapping in `main!`


view this post on Zulip Niclas Ahden (Nov 20 2026 at 12:49):

I noticed that I am no longer able to unwrap an Ok in main!, but I am able to do it at the top level. Is that intentional?

https://github.com/niclas-ahden/roc-non-zero does this in its main!:

# Look at this spectacular line!
Ok(non_zero) = NonZero.new(42)

and that no longer compiles on Roc 22e3718.

view this post on Zulip Richard Feldman (Nov 20 2026 at 12:54):

not intentional! Can you open an issue for it?

view this post on Zulip Niclas Ahden (Nov 20 2026 at 12:54):

Will do!

view this post on Zulip Niclas Ahden (Nov 20 2026 at 13:00):

https://github.com/roc-lang/roc/issues/13281


Last updated: Nov 26 2026 at 20:35 UTC