tparameterizedparent1.nim 242 B

123456789101112131415
  1. discard """
  2. file: "tparameterizedparent1.nim"
  3. line: 14
  4. errormsg: "inheritance only works with non-final objects"
  5. """
  6. # bug #5264
  7. type
  8. FruitBase = object
  9. color: int
  10. Apple[T] = object of T
  11. width: int
  12. var x: Apple[FruitBase]