mirror of
https://github.com/nim-lang/Nim.git
synced 2026-09-16 18:22:11 +00:00
@@ -2260,20 +2260,20 @@ proc semStmtList(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
||||
# nkNilLit, nkEmpty}:
|
||||
# dec last
|
||||
for i in 0..<n.len:
|
||||
var expr = semExpr(c, n[i], flags)
|
||||
n[i] = expr
|
||||
if c.matchedConcept != nil and expr.typ != nil and
|
||||
var x = semExpr(c, n[i], flags)
|
||||
n[i] = x
|
||||
if c.matchedConcept != nil and x.typ != nil and
|
||||
(nfFromTemplate notin n.flags or i != last):
|
||||
case expr.typ.kind
|
||||
case x.typ.kind
|
||||
of tyBool:
|
||||
if expr.kind == nkInfix and
|
||||
expr[0].kind == nkSym and
|
||||
expr[0].sym.name.s == "==":
|
||||
if expr[1].typ.isUnresolvedStatic:
|
||||
inferConceptStaticParam(c, expr[1], expr[2])
|
||||
if x.kind == nkInfix and
|
||||
x[0].kind == nkSym and
|
||||
x[0].sym.name.s == "==":
|
||||
if x[1].typ.isUnresolvedStatic:
|
||||
inferConceptStaticParam(c, x[1], x[2])
|
||||
continue
|
||||
elif expr[2].typ.isUnresolvedStatic:
|
||||
inferConceptStaticParam(c, expr[2], expr[1])
|
||||
elif x[2].typ.isUnresolvedStatic:
|
||||
inferConceptStaticParam(c, x[2], x[1])
|
||||
continue
|
||||
|
||||
let verdict = semConstExpr(c, n[i])
|
||||
|
||||
@@ -625,7 +625,7 @@ proc procTypeRel(c: var TCandidate, f, a: PType): TTypeRelation =
|
||||
return isNone
|
||||
elif a[0] != nil:
|
||||
return isNone
|
||||
|
||||
|
||||
result = getProcConvMismatch(c.c.config, f, a, result)[1]
|
||||
|
||||
when useEffectSystem:
|
||||
@@ -2272,6 +2272,8 @@ proc prepareOperand(c: PContext; formal: PType; a: PNode): PNode =
|
||||
else:
|
||||
result = a
|
||||
considerGenSyms(c, result)
|
||||
if result.kind != nkHiddenDeref and result.typ.kind in {tyVar, tyLent} and c.matchedConcept == nil:
|
||||
result = newDeref(result)
|
||||
|
||||
proc prepareOperand(c: PContext; a: PNode): PNode =
|
||||
if a.typ.isNil:
|
||||
|
||||
Reference in New Issue
Block a user