tparameterizedparent0.nim 247 B

12345678910111213141516
  1. discard """
  2. file: "tparameterizedparent0.nim"
  3. line: 14
  4. errormsg: "inheritance only works with non-final objects"
  5. """
  6. # bug #5264
  7. type
  8. Kapal* = enum
  9. Besar
  10. Apple[T] = object of T
  11. color: int
  12. var x = Apple[Kapal](color: 13)
  13. echo x