fixes #6755; error message could be better but oh well
This commit is contained in:
parent
e68adca0c9
commit
950f2d7c2f
1 changed files with 6 additions and 4 deletions
|
|
@ -579,10 +579,12 @@ proc patchBody(c: PContext; n: PNode; info: TLineInfo) =
|
||||||
|
|
||||||
template inst(field, t) =
|
template inst(field, t) =
|
||||||
if field.ast != nil and field.ast[genericParamsPos].kind != nkEmpty:
|
if field.ast != nil and field.ast[genericParamsPos].kind != nkEmpty:
|
||||||
assert t.typeInst != nil
|
if t.typeInst != nil:
|
||||||
field = c.instTypeBoundOp(c, field, t.typeInst, info, attachedAsgn, 1)
|
field = c.instTypeBoundOp(c, field, t.typeInst, info, attachedAsgn, 1)
|
||||||
if field.ast != nil:
|
if field.ast != nil:
|
||||||
patchBody(c, field.ast, info)
|
patchBody(c, field.ast, info)
|
||||||
|
else:
|
||||||
|
localError(c.graph.config, info, "unresolved generic parameter")
|
||||||
|
|
||||||
proc isTrival(s: PSym): bool {.inline.} = s == nil or s.ast[bodyPos].len == 0
|
proc isTrival(s: PSym): bool {.inline.} = s == nil or s.ast[bodyPos].len == 0
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue