mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-03 03:32:32 +00:00
29 lines
316 B
Nim
Executable File
29 lines
316 B
Nim
Executable File
discard """
|
|
disabled: true
|
|
"""
|
|
|
|
# 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 instantiate:
|
|
type
|
|
TA[T] = object
|
|
a: PA[T]
|
|
PA[T] = ref TA[T]
|
|
|
|
type
|
|
PA[T] = ref TA[T]
|
|
TA[T] = object
|
|
|
|
|