typedescs2.nim 261 B

123456789101112131415161718
  1. discard """
  2. errormsg: "invalid type: 'typedesc[Table]' for const"
  3. file: "typedescs2.nim"
  4. line: 16
  5. """
  6. # bug #9961
  7. import typetraits
  8. import tables
  9. proc test(v: typedesc) =
  10. echo v.type.name
  11. # This crashes the compiler
  12. const b: typedesc = Table
  13. test b