fixes #11225; generic sandwich problems; [backport:1.2] (#17255)

* fixes #11225; generic sandwich problems; [backport:1.2]
* progress
* delegating these symbols must be done via 'bind'
This commit is contained in:
Andreas Rumpf 2021-03-09 20:19:24 +01:00 • committed by GitHub
commit 2f213db7ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 132 additions and 21 deletions

View file

@ -1823,8 +1823,8 @@ proc semMethodPrototype(c: PContext; s: PSym; n: PNode) =
let t = tt[col]
if t != nil and t.kind == tyGenericInvocation:
var x = skipTypes(t[0], {tyVar, tyLent, tyPtr, tyRef, tyGenericInst,
tyGenericInvocation, tyGenericBody,
tyAlias, tySink, tyOwned})
tyGenericInvocation, tyGenericBody,
tyAlias, tySink, tyOwned})
if x.kind == tyObject and t.len-1 == n[genericParamsPos].len:
foundObj = true
addMethodToGeneric(c.graph, c.module.position, x, col, s)