tsubclassgenericerror.nim 348 B

123456789101112
  1. discard """
  2. errormsg: "cannot instantiate 'GenericParentType[T]' inside of type definition: 'GenericChildType'; Maybe generic arguments are missing?"
  3. line: 8
  4. """
  5. type
  6. GenericParentType[T] = ref object of RootObj
  7. GenericChildType[T] = ref object of GenericParentType # missing the [T]
  8. val: T
  9. var instance : GenericChildType[int] = nil