This commit is contained in:
Andreas Rumpf 2019-06-26 23:10:20 +02:00 • committed by GitHub
commit ce2777af5a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -899,7 +899,7 @@ proc semIndirectOp(c: PContext, n: PNode, flags: TExprFlags): PNode =
semOpAux(c, n)
var t: PType = nil
if n.sons[0].typ != nil:
t = skipTypes(n.sons[0].typ, abstractInst+{tyOwned}-{tyTypeDesc})
t = skipTypes(n.sons[0].typ, abstractInst+{tyOwned}-{tyTypeDesc, tyDistinct})
if t != nil and t.kind == tyProc:
# This is a proc variable, apply normal overload resolution
let m = resolveIndirectCall(c, n, nOrig, t)