From c446c0f57af03e0be3a5b39be48d14676e7deebe Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Tue, 11 Feb 2020 23:48:41 +0100 Subject: fixes #13378 [backport] (#13392) --- compiler/sigmatch.nim | 2 ++ 1 file changed, 2 insertions(+) (limited to 'compiler') diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 09b8d0b76..4105d3780 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -1942,6 +1942,8 @@ 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[0], result.typ) if r < isGeneric: return nil -- cgit 1.4.1-2-gfad0