This commit is contained in:
Clyybber 2020-07-15 11:34:10 +02:00 • committed by GitHub
commit 08159733cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 2 deletions

View file

@ -67,6 +67,9 @@ ho
king
live long; long live
king
hi
try
bye
'''
"""
@ -494,3 +497,30 @@ proc weirdScopes =
echo king
weirdScopes()
# bug #14985
proc getScope(): string =
if true:
return "hi"
else:
"else"
echo getScope()
proc getScope3(): string =
try:
"try"
except:
return "except"
echo getScope3()
proc getScope2(): string =
case true
of true:
return "bye"
else:
"else"
echo getScope2()