t2574.nim 203 B

123456789101112131415
  1. discard """
  2. errormsg: "cannot call method eval at compile time"
  3. line: 14
  4. """
  5. type
  6. PExpr = ref object of RootObj
  7. method eval(e: PExpr): int =
  8. discard
  9. static:
  10. let x = PExpr()
  11. discard x.eval