remove dead code elimination option (#7669)
This commit is contained in:
parent
a8b70c5500
commit
72dfe176f5
57 changed files with 67 additions and 122 deletions
|
|
@ -2,13 +2,16 @@ discard """
|
|||
ccodeCheck: "\\i @'__attribute__((noreturn))' .*"
|
||||
"""
|
||||
|
||||
proc noret1*(i: int) {.noreturn.} =
|
||||
proc noret1*(i: int) {.noreturn.} =
|
||||
echo i
|
||||
|
||||
|
||||
proc noret2*(i: int): void {.noreturn.} =
|
||||
proc noret2*(i: int): void {.noreturn.} =
|
||||
echo i
|
||||
|
||||
noret1(1)
|
||||
noret2(2)
|
||||
|
||||
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