fixes #33
This commit is contained in:
parent
7405278138
commit
7f3b3298b4
3 changed files with 29 additions and 26 deletions
|
|
@ -1,28 +1,26 @@
|
|||
discard """
|
||||
disabled: true
|
||||
"""
|
||||
|
||||
# Compiles:
|
||||
|
||||
type
|
||||
TA[T] = object
|
||||
PA[T] = ref TA[T]
|
||||
TA[T] = object
|
||||
field: T
|
||||
var a: PA[string]
|
||||
new(a)
|
||||
a.field = "some string"
|
||||
|
||||
# Compiles unless you use var a: PA[string]
|
||||
type
|
||||
PA = ref TA
|
||||
TA[T] = object
|
||||
when false:
|
||||
# Compiles unless you use var a: PA[string]
|
||||
type
|
||||
PA = ref TA
|
||||
TA[T] = object
|
||||
|
||||
|
||||
# Cannot instantiate:
|
||||
type
|
||||
TA[T] = object
|
||||
a: PA[T]
|
||||
PA[T] = ref TA[T]
|
||||
# Cannot instantiate:
|
||||
type
|
||||
TA[T] = object
|
||||
a: PA[T]
|
||||
PA[T] = ref TA[T]
|
||||
|
||||
type
|
||||
PA[T] = ref TA[T]
|
||||
TA[T] = object
|
||||
type
|
||||
PA[T] = ref TA[T]
|
||||
TA[T] = object
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue