[cleanups] doassert => doAssert; mark deadcode (#14711)

This commit is contained in:
Timothee Cour 2020-06-17 20:25:25 -07:00 • committed by GitHub
commit 7df27b5035
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 26 additions and 24 deletions

View file

@ -184,33 +184,33 @@ block tcasestm:
doAssert(bstatic == false)
var bb: bool
doassert(not compiles(
doAssert(not compiles(
bb = case str2:
of "": raise newException(ValueError, "Invalid boolean")
elif str.startsWith("Y"): true
elif str.startsWith("N"): false
))
doassert(not compiles(
doAssert(not compiles(
bb = case str2:
of "Y": true
of "N": false
))
doassert(not compiles(
doAssert(not compiles(
bb = case str2:
of "Y": true
of "N": raise newException(ValueError, "N not allowed")
))
doassert(not compiles(
doAssert(not compiles(
bb = case str2:
of "Y": raise newException(ValueError, "Invalid Y")
else: raise newException(ValueError, "Invalid N")
))
doassert(not compiles(
doAssert(not compiles(
bb = case str2:
of "Y":
raise newException(ValueError, "Invalid Y")
@ -219,7 +219,7 @@ block tcasestm:
))
doassert(not compiles(
doAssert(not compiles(
bb = case str2:
of "Y":
"invalid Y".quit(3)