t17437.nim 532 B

1234567891011121314151617181920212223
  1. discard """
  2. cmd: "nim check $file"
  3. errormsg: ""
  4. nimout: '''
  5. t17437.nim(20, 16) Error: undeclared identifier: 'x'
  6. t17437.nim(20, 16) Error: expression 'x' has no type (or is ambiguous)
  7. t17437.nim(20, 19) Error: incorrect object construction syntax
  8. t17437.nim(20, 19) Error: incorrect object construction syntax
  9. t17437.nim(20, 12) Error: expression '' has no type (or is ambiguous)
  10. '''
  11. """
  12. # bug #17437 invalid object construction should result in error
  13. type
  14. V = ref object
  15. x, y: int
  16. proc m =
  17. var v = V(x: x, y)
  18. m()