mirror of
https://github.com/nim-lang/Nim.git
synced 2026-08-29 18:11:44 +00:00
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)
|
||||
Reference in New Issue
Block a user