summary refs log tree commit diff stats
path: root/tests/discard/tvoidcontext.nim
blob: 9e2b913ad88127ec0762a84db1529a793cedd391 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
discard """
  errormsg: '''expression '"invalid"' is of type 'string' and has to be used (or discarded)'''
  line: 12
"""

proc valid*(): string =
  let x = 317
  "valid"

proc invalid*(): string =
  result = "foo"
  "invalid"