jakt icon indicating copy to clipboard operation
jakt copied to clipboard

typechecker+codegen+tests: Accept never as a branch result

Open cg-jl opened this issue 2 years ago • 1 comments

This affects matches specially but another test is added to make sure that assigning never is still reported as an error since it doesn't make sense to store something you're not getting.

EDIT: cc @alimpfard

cg-jl avatar Aug 29 '22 20:08 cg-jl

I'm gonna copypaste what I said on discord:

imo => { panic() } makes it clear that this branch isn't yielding values, unlike => panic() which sounds like it's evaluating to the value of that call

But if this sounds like a good idea to @jntrnr & @awesomekling, I wouldn't mind having it

alimpfard avatar Aug 29 '22 20:08 alimpfard