0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00

langref: Add test case for "if error union with optional"

This is an edge case that isn't too uncommon but is rather confusing to try to deduce without documentation, since it feels like `else` is being overloaded in this scenario and there's no obvious 'correct' behavior here. This just adds a test demonstrating how Zig currently behaves in this scenario.
This commit is contained in:
Ryan Liptak 2020-07-08 00:53:19 -07:00 • committed by Andrew Kelley
commit f77c968cf8