Implements RFCs #209 (#13995)

* add test
* add changelod entry
Co-authored-by: cooldome <ariabushenko@bk.ru>
This commit is contained in:
cooldome 2020-04-16 20:04:05 +01:00 • committed by GitHub
commit 9295251e68
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 292 additions and 108 deletions

View file

@ -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))