Stream: beginners

Topic: called `Option::unwrap()` on a `None` value'


view this post on Zulip Fábio Beirão (Jun 13 2023 at 09:39):

:face_with_peeking_eye: I can't be the only one that writes such terrible roc code, that I keep hitting weird edge cases :sweat_smile: please tell me I'm not the only one :sweat_smile:

roc check --> 0 errors and 0 warnings found in 23 ms. :+1: all good bro, you got this

roc test: --> thread 'main' panicked at 'called Option::unwrap() on a None value', crates/compiler/mono/src/drop_specialization.rs:1077:43 nop bro, you broke me :sweat_smile:

view this post on Zulip Fábio Beirão (Jun 13 2023 at 09:46):

Opened issue 5547 hopefully this is something silly on my side

view this post on Zulip Luke Boswell (Jun 13 2023 at 10:24):

I know the feeling :laughing: AoC seems to be a good way to uncover these bugs.

view this post on Zulip Fábio Beirão (Jun 13 2023 at 11:30):

I am so stuck haha :sweat_smile:. I have been trying to comment out code and move the model around a bit, but I keep hitting this unwrap of None :scream:. I can't find a root cause why my code fails so miserably

view this post on Zulip Fábio Beirão (Jun 13 2023 at 11:50):

Found a smaller example and the root cause (from user's point of view) on what causes this. Added this to the ticket.

view this post on Zulip Brendan Hansknecht (Jun 13 2023 at 13:14):

This has gotten a lot better, but still has a lot of issues. Filling lots of issues for this stuff is useful. Helps us slowly fix the issues


Last updated: Jul 06 2025 at 12:14 UTC