Revert "fixes #13378 [backport] (#13392)"

This reverts commit 14e1f82f42.
This commit is contained in:
narimiran
2020-02-21 09:46:37 +01:00
parent cfd0ae4adb
commit b6924383df
2 changed files with 0 additions and 18 deletions

View File

@@ -1945,8 +1945,6 @@ proc localConvMatch(c: PContext, m: var TCandidate, f, a: PType,
if result != nil:
if result.typ == nil: return nil
# bug #13378, ensure we produce a real generic instantiation:
result = c.semExpr(c, call)
# resulting type must be consistent with the other arguments:
var r = typeRel(m, f.sons[0], result.typ)
if r < isGeneric: return nil

View File

@@ -4,7 +4,6 @@ discard """
0
float32
float32
(name: "Resource 1", readers: ..., writers: ...)
'''
"""
@@ -125,18 +124,3 @@ block tgeneric5:
echo T
bar(0.0'f32)
# bug #13378
type
Resource = ref object of RootObj
name: string
readers, writers: seq[RenderTask]
RenderTask = ref object
name: string
var res = Resource(name: "Resource 1")
(proc (r: typeof(res)) =
echo r[])(res)