[os:standalone]fix #14011 (#17564)

This commit is contained in:
flywind 2021-03-29 23:54:28 +08:00 • committed by GitHub
commit 7ad49950bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 36 additions and 2 deletions

14
tests/gc/tstandalone.nim Normal file
View file

@ -0,0 +1,14 @@
discard """
matrix: "--os:standalone --gc:none"
exitcode: 1
output: "value out of range"
"""
type
rangeType = range[0..1]
var
r: rangeType = 0
i = 2
r = rangeType(i)