diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 64a8d2a4f9..aa0489cd22 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -652,6 +652,9 @@ proc overloadedCallOpr(c: PContext, n: PNode): PNode = result = semExpr(c, result, flags = {efNoUndeclared}) proc changeType(c: PContext; n: PNode, newType: PType, check: bool) = + template isViewTarget(t: PType): bool = + t.skipTypes({tyGenericInst, tyAlias, tySink}).kind in {tyVar, tyLent} + case n.kind of nkCurly: for i in 0..