Check the RHS when building a set (#8159)

Fixes #2669
This commit is contained in:
LemonBoy 2018-06-30 09:16:14 +02:00 • committed by Andreas Rumpf
commit 0a14b3d198
2 changed files with 7 additions and 1 deletions

6
tests/sets/t2669.nim Normal file
View file

@ -0,0 +1,6 @@
discard """
line: 6
errormsg: "cannot convert 6 to range 1..5(int8)"
"""
var c: set[range[1i8..5i8]] = {1i8, 2i8, 6i8}