mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-05 12:37:46 +00:00
fixes #6755; error message could be better but oh well
This commit is contained in:
@@ -579,10 +579,12 @@ proc patchBody(c: PContext; n: PNode; info: TLineInfo) =
|
||||
|
||||
template inst(field, t) =
|
||||
if field.ast != nil and field.ast[genericParamsPos].kind != nkEmpty:
|
||||
assert t.typeInst != nil
|
||||
field = c.instTypeBoundOp(c, field, t.typeInst, info, attachedAsgn, 1)
|
||||
if field.ast != nil:
|
||||
patchBody(c, field.ast, info)
|
||||
if t.typeInst != nil:
|
||||
field = c.instTypeBoundOp(c, field, t.typeInst, info, attachedAsgn, 1)
|
||||
if field.ast != nil:
|
||||
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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user