Files
Nim/tests/arc/t20588.nim
ringabout 55636a2913 fixes #14255; Crash in compiler when using system.any by accident. (#21562)
fixes #14255; Crash in compiler when using system.any by accident.
2023-03-23 16:10:14 +01:00

25 lines
459 B
Nim

discard """
cmd: "nim check --warnings:off --hints:off $file"
errormsg: ""
nimout: '''
t20588.nim(20, 12) Error: illegal type conversion to 'auto'
t20588.nim(21, 14) Error: illegal type conversion to 'typed'
t20588.nim(22, 16) Error: illegal type conversion to 'untyped'
t20588.nim(24, 7) Error: illegal type conversion to 'any'
'''
"""
discard 0.0.auto
discard typed("abc")
discard untyped(4)
var a = newSeq[bool](1000)
if any(a):
echo "ok?"