mirror of
https://github.com/nim-lang/Nim.git
synced 2026-05-02 03:54:44 +00:00
fixes #12244 [backport]
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
discard """
|
||||
output: '''[127, 127, 0, 255]
|
||||
[127, 127, 0, 255]
|
||||
|
||||
(data: 1)
|
||||
'''
|
||||
|
||||
nimout: '''caught Exception
|
||||
@@ -180,3 +182,21 @@ static:
|
||||
var stream = initCtsStream(file)
|
||||
parseAtlas(stream)
|
||||
echo "Done!"
|
||||
|
||||
|
||||
# bug #12244
|
||||
|
||||
type
|
||||
Apple = object
|
||||
data: int
|
||||
|
||||
func what(x: var Apple) =
|
||||
x = Apple(data: 1)
|
||||
|
||||
func oh_no(): Apple =
|
||||
what(result)
|
||||
|
||||
const
|
||||
vmCrash = oh_no()
|
||||
|
||||
debugEcho vmCrash
|
||||
|
||||
Reference in New Issue
Block a user