Add tests for #8481, #6490 and #4061 (#14083)

This commit is contained in:
Clyybber 2020-04-23 19:52:33 +02:00 • committed by GitHub
commit eca8f1d79f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 0 deletions

View file

@ -63,3 +63,13 @@ proc parse(cts: CTS, jn: JsonNode) =
proc p(x: proc(){.closure.} not nil) = discard
p(proc(){.closure.} = discard)
# bug #6490
proc p2(a: proc()) =
if a.isNil:
raise newException(ValueError, "a is nil")
else:
let b: proc() not nil = a
p2(writeStackTrace)