parent
3eef0491a8
commit
d901d3b8c5
2 changed files with 14 additions and 1 deletions
10
tests/objects/tunsafenew.nim
Normal file
10
tests/objects/tunsafenew.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
discard """
|
||||
errormsg: "conversion from int literal(-1) to Natural is invalid"
|
||||
"""
|
||||
|
||||
type
|
||||
Obj = object
|
||||
case b: bool
|
||||
else: discard
|
||||
var o: ref Obj
|
||||
unsafeNew(o, -1)
|
||||
Loading…
Add table
Add a link
Reference in a new issue