Make ./koch temp --gc:arc work (#14186)

This commit is contained in:
Clyybber 2020-05-01 20:25:18 +02:00 • committed by GitHub
commit 1f1e4de3bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 26 additions and 11 deletions

View file

@ -2584,8 +2584,11 @@ proc argtypeMatches*(c: PContext, f, a: PType, fromHlo = false): bool =
# pattern templates do not allow for conversions except from int literal
res != nil and m.convMatches == 0 and m.intConvMatches in [0, 256]
when not defined(nimHasSinkInference):
{.pragma: nosinks.}
proc instTypeBoundOp*(c: PContext; dc: PSym; t: PType; info: TLineInfo;
op: TTypeAttachedOp; col: int): PSym =
op: TTypeAttachedOp; col: int): PSym {.nosinks.} =
var m = newCandidate(c, dc.typ)
if col >= dc.typ.len:
localError(c.config, info, "cannot instantiate: '" & dc.name.s & "'")