summary refs log tree commit diff stats
path: root/tests/discard/tvoidcontext.nim
blob: 25e0d4fdff800745720e972408e5bc8f505f3e21 (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 discarded'''
  line: 12
"""

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

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