Allow noreturn procs with void type (#6973)
This commit is contained in:
parent
2b3ec0a7c6
commit
53cf0b2c24
2 changed files with 5 additions and 1 deletions
|
|
@ -5,6 +5,10 @@ ccodeCheck: "\\i @'__attribute__((noreturn))' .*"
|
|||
proc noret1*(i: int) {.noreturn.} =
|
||||
echo i
|
||||
|
||||
|
||||
proc noret2*(i: int): void {.noreturn.} =
|
||||
echo i
|
||||
|
||||
var p {.used.}: proc(i: int): int
|
||||
doAssert(not compiles(
|
||||
p = proc(i: int): int {.noreturn.} = i # noreturn lambda returns int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue