diff options
author | Andrey Sobolev <andrey.sobolev@xored.com> | 2015-09-14 11:50:39 +0600 |
---|---|---|
committer | Andrey Sobolev <andrey.sobolev@xored.com> | 2015-09-14 11:50:39 +0600 |
commit | 2f6dc8c47f836b66c1a28fd0b90a9e591b6c9be5 (patch) | |
tree | 0676259b78fba9788d6dffd441de1d7f5b0df140 /tests/discard | |
parent | a1aa7da37612eac6f961f0daaf5454f936b4e295 (diff) | |
parent | 148bbee05f31802666dbf1730e0df328ff57a384 (diff) | |
download | Nim-2f6dc8c47f836b66c1a28fd0b90a9e591b6c9be5.tar.gz |
Merge remote-tracking branch 'nim-lang/devel' into emscripten-support
Diffstat (limited to 'tests/discard')
-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" |