fixes type check of ranges for default fields (#20660)

This commit is contained in:
ringabout 2022-10-27 23:23:33 +08:00 • committed by GitHub
commit 27896ed469
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 2 deletions

View file

@ -0,0 +1,11 @@
discard """
errormsg: "conversion from int literal(0) to range 1..5(int) is invalid"
line: 9
"""
type
Point = object
y: int
x: range[1..5] = 0
echo default(Point)