mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-04 02:44:44 +00:00
@@ -76,7 +76,7 @@ template semIdeForTemplateOrGeneric(c: PContext; n: PNode;
|
||||
proc fitNodePostMatch(c: PContext, formal: PType, arg: PNode): PNode =
|
||||
result = arg
|
||||
let x = result.skipConv
|
||||
if x.kind in {nkPar, nkTupleConstr} and formal.kind != tyExpr:
|
||||
if x.kind in {nkPar, nkTupleConstr, nkCurly} and formal.kind != tyExpr:
|
||||
changeType(c, x, formal, check=true)
|
||||
else:
|
||||
result = skipHiddenSubConv(result)
|
||||
|
||||
6
tests/sets/t2669.nim
Normal file
6
tests/sets/t2669.nim
Normal 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}
|
||||
Reference in New Issue
Block a user