ugh, maybe broke git
This commit is contained in:
parent
dc669155e3
commit
4741e8f9a1
25 changed files with 587 additions and 172 deletions
24
tests/accept/compile/tgenericrefs.nim
Normal file
24
tests/accept/compile/tgenericrefs.nim
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
# Compiles:
|
||||
|
||||
type
|
||||
TA[T] = object
|
||||
PA[T] = ref TA[T]
|
||||
var a: PA[string]
|
||||
|
||||
# Compiles unless you use var a: PA[string]
|
||||
type
|
||||
PA = ref TA
|
||||
TA[T] = object
|
||||
|
||||
|
||||
# Cannot instanciate:
|
||||
type
|
||||
TA[T] = object
|
||||
a: PA[T]
|
||||
PA[T] = ref TA[T]
|
||||
|
||||
type
|
||||
PA[T] = ref TA[T]
|
||||
TA[T] = object
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue