-
Notifications
You must be signed in to change notification settings - Fork 6
Closed as not planned
Description
KotlinIsland/basedtyping#28
would need to invert the unreachable
error code when it sees an assert_unreachable
call, such that it's raised if the code is reachable. perhaps a seperate error code?
when warn-unreachable
is enabled
if False:
assert_unreachable() # no error
if False:
print(1) #error: unreachable
assert_unreachable() # no error
else:
assert_unreachable() # error
When warn-unreachable
is disabled
if False:
print(1) # no error
assert_unreachable() # no error
else:
assert_unreachable() # error