With this code, ponyc complains the first line of maybe_error isn't reachable. This modified version compiles as expected.
Match seems to give a different error. This code incorrectly believes the function body is None.
Reproduced in ponyc versions 0.58.0 and 0.58.7.