* add test * add changelod entry Co-authored-by: cooldome <ariabushenko@bk.ru>
This commit is contained in:
parent
b6f99409a9
commit
9295251e68
9 changed files with 292 additions and 108 deletions
|
|
@ -1,7 +1,6 @@
|
|||
discard """
|
||||
cmd: "nim c --gc:arc --exceptions:goto --panics:off $file"
|
||||
output: '''field error prevented
|
||||
prevented!
|
||||
output: '''prevented!
|
||||
caught
|
||||
AssertionError
|
||||
900'''
|
||||
|
|
@ -26,11 +25,8 @@ proc helper = doAssert(false)
|
|||
|
||||
proc main(i: int) =
|
||||
var obj = Obj(kind: kindA, s: "abc")
|
||||
try:
|
||||
obj.kind = kindB
|
||||
except FieldError:
|
||||
echo "field error prevented"
|
||||
|
||||
obj.kind = kindB
|
||||
obj.i = 2
|
||||
try:
|
||||
var objA = ObjA()
|
||||
bplease(ObjB(objA))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue