diff options
author | Araq <rumpf_a@web.de> | 2013-06-13 15:19:55 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-06-13 15:19:55 +0200 |
commit | ff1d68c50b5df56645eb09a523c08726772bec4d (patch) | |
tree | e6a3a39f95c381abfe50499902afa7e57dc83204 /tests/reject | |
parent | 2464da5b261937f70400c1ca2b3ef9786743cef0 (diff) | |
download | Nim-ff1d68c50b5df56645eb09a523c08726772bec4d.tar.gz |
fixes #481
Diffstat (limited to 'tests/reject')
-rw-r--r-- | tests/reject/tnotnil1.nim | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/reject/tnotnil1.nim b/tests/reject/tnotnil1.nim index 222c77376..863fe45f8 100644 --- a/tests/reject/tnotnil1.nim +++ b/tests/reject/tnotnil1.nim @@ -1,6 +1,6 @@ discard """ errormsg: "'y' is provably nil" - line:25 + line:38 """ import strutils @@ -10,6 +10,19 @@ type TObj = object x, y: int +type + superstring = string not nil + + +proc q(s: superstring) = + echo s + +proc p2() = + var a: string = "I am not nil" + q(a) # but this should and does not + +p2() + proc q(x: pointer not nil) = nil |