diff options
Diffstat (limited to 'tests/controlflow/tstatret.nim')
-rw-r--r-- | tests/controlflow/tstatret.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/controlflow/tstatret.nim b/tests/controlflow/tstatret.nim new file mode 100644 index 000000000..bf90255a0 --- /dev/null +++ b/tests/controlflow/tstatret.nim @@ -0,0 +1,12 @@ +discard """ + file: "tstatret.nim" + line: 9 + errormsg: "statement not allowed after" +""" +# no statement after return +proc main() = + return + echo("huch?") #ERROR_MSG statement not allowed after + + + |