Fix #4020; Better handling of templates within concepts
This commit is contained in:
parent
b199c5af4e
commit
8f4b374327
5 changed files with 65 additions and 2 deletions
|
|
@ -1761,7 +1761,8 @@ proc semStmtList(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
|||
else:
|
||||
var expr = semExpr(c, n.sons[i], flags)
|
||||
n.sons[i] = expr
|
||||
if c.matchedConcept != nil and expr.typ != nil:
|
||||
if c.matchedConcept != nil and expr.typ != nil and
|
||||
(nfFromTemplate notin n.flags or i != last):
|
||||
case expr.typ.kind
|
||||
of tyBool:
|
||||
if expr.kind == nkInfix and
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue