parent
3105909f88
commit
7ccc7d7e93
4 changed files with 26 additions and 6 deletions
|
|
@ -7,10 +7,10 @@ type
|
|||
|
||||
proc mytest1(s: MyObject, i: int): lent string =
|
||||
## works fine
|
||||
if i < s.x.len - 1 and s.x[i] != "":
|
||||
if i < s.x.len - 1 and s.x[i] != "":
|
||||
result = s.x[i]
|
||||
else: raise newException(KeyError, "err1")
|
||||
|
||||
|
||||
proc mytest2(s: MyObject, i: int): lent string =
|
||||
## reject due to if expr
|
||||
if i < s.x.len - 1 and s.x[i] != "": s.x[i]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue