parent
fec19c980e
commit
0f7f159a35
4 changed files with 26 additions and 2 deletions
11
tests/ccgbugs/t15623.nim
Normal file
11
tests/ccgbugs/t15623.nim
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
discard """
|
||||
action: "compile"
|
||||
"""
|
||||
|
||||
# bug #15623
|
||||
block:
|
||||
echo cast[ptr int](nil)[]
|
||||
|
||||
block:
|
||||
var x: ref int = nil
|
||||
echo cast[ptr int](x)[]
|
||||
13
tests/ccgbugs/t15623_2.nim
Normal file
13
tests/ccgbugs/t15623_2.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
discard """
|
||||
output: '''0
|
||||
0
|
||||
'''
|
||||
"""
|
||||
|
||||
# bug #15623
|
||||
block:
|
||||
echo cast[int](cast[ptr int](nil))
|
||||
|
||||
block:
|
||||
var x: ref int = nil
|
||||
echo cast[int](cast[ptr int](x))
|
||||
Loading…
Add table
Add a link
Reference in a new issue