Araq/Nimrod — Issue #88: inheritance for generics does not work
Author: Araq
Created: 2012-01-11 00:50:11+00:00
State: open

The following program should compile, but does not:

''''nimrod

type
TGen[T] = object
field: T

TDerived[T] = object of TGen[T]
nextField: T

proc doSomething[T](x: ref TGen[T]) =
type
Ty = ref TDerived[T]
echo Ty(x).nextField

var
x: ref TDerived[string]
new(x)
x.nextField = "test"

doSomething(x)
''''