fixes #12488 [backport]
This commit is contained in:
parent
2dea920379
commit
87f0d534d6
2 changed files with 21 additions and 1 deletions
|
|
@ -15,6 +15,9 @@ Done!
|
|||
foo4
|
||||
foo4
|
||||
foo4
|
||||
(a: 0, b: 0)
|
||||
(a: 0, b: 0)
|
||||
(a: 0, b: 0)
|
||||
'''
|
||||
"""
|
||||
|
||||
|
|
@ -234,3 +237,17 @@ static:
|
|||
echo foo()
|
||||
echo foo()
|
||||
echo foo()
|
||||
|
||||
# bug #12488
|
||||
type
|
||||
MyObject = object
|
||||
a,b: int
|
||||
MyObjectRef = ref MyObject
|
||||
|
||||
static:
|
||||
let x1 = new(MyObject)
|
||||
echo x1[]
|
||||
let x2 = new(MyObjectRef)
|
||||
echo x2[]
|
||||
let x3 = new(ref MyObject) # cannot generate VM code for ref MyObject
|
||||
echo x3[]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue