t7600_2.nim 407 B

123456789101112131415161718192021
  1. discard """
  2. errormsg: "type mismatch: got <Thin>"
  3. nimout: '''t7600_2.nim(20, 6) Error: type mismatch: got <Thin>
  4. but expected one of:
  5. proc test(x: Paper)
  6. first type mismatch at position: 1
  7. required type for x: Paper
  8. but expression 'tn' is of type: Thin
  9. expression: test tn'''
  10. """
  11. type
  12. Paper = ref object of RootObj
  13. Thin = object of Paper
  14. proc test(x: Paper) = discard
  15. var tn = Thin()
  16. test tn