diff options
author | Araq <rumpf_a@web.de> | 2015-09-10 13:20:15 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-09-10 13:20:15 +0200 |
commit | 34ab1d3e340635620d41ea1b0250830971648dda (patch) | |
tree | 9de5954635cbbcb62c4a9fe0706100d43f180cfd /tests/discard/tvoidcontext.nim | |
parent | 31bbc24462e1c5e05c2eea4837292ac5e9367515 (diff) | |
download | Nim-34ab1d3e340635620d41ea1b0250830971648dda.tar.gz |
fixes #1528
Diffstat (limited to 'tests/discard/tvoidcontext.nim')
-rw-r--r-- | tests/discard/tvoidcontext.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/discard/tvoidcontext.nim b/tests/discard/tvoidcontext.nim new file mode 100644 index 000000000..c3ea68bae --- /dev/null +++ b/tests/discard/tvoidcontext.nim @@ -0,0 +1,12 @@ +discard """ + errormsg: "value of type 'string' has to be discarded" + line: 12 +""" + +proc valid*(): string = + let x = 317 + "valid" + +proc invalid*(): string = + result = "foo" + "invalid" |