t7600_1.nim 369 B

12345678910111213141516171819
  1. discard """
  2. errormsg: "type mismatch: got <Thin[system.int]>"
  3. nimout: '''t7600_1.nim(18, 6) Error: type mismatch: got <Thin[system.int]>
  4. but expected one of:
  5. proc test[T](x: Paper[T])
  6. expression: test tn'''
  7. """
  8. type
  9. Paper[T] = ref object of RootObj
  10. thickness: T
  11. Thin[T] = object of Paper[T]
  12. proc test[T](x: Paper[T]) = discard
  13. var tn = Thin[int]()
  14. test tn