tparameterizedparent1.nim 242 B

123456789101112131415
  1. discard """
  2. errormsg: "inheritance only works with non-final objects"
  3. file: "tparameterizedparent1.nim"
  4. line: 14
  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]