diff --git a/compiler/sigmatch.nim b/compiler/sigmatch.nim index 16d0057c36..3e9483c24c 100644 --- a/compiler/sigmatch.nim +++ b/compiler/sigmatch.nim @@ -1805,7 +1805,11 @@ proc typeRel(c: var TCandidate, f, aOrig: PType, let inst = prepareMetatypeForSigmatch(c.c, c.bindings, c.call.info, f) return typeRel(c, inst, a, flags) - if x.kind == tyGenericInvocation: + if concpt.kind == tyConcept: + # Concept dispatch devaluates generic concepts, + # so it must precede the generic invocation case + result = enterConceptMatch(c, f, x, flags) + elif x.kind == tyGenericInvocation: if f[0] == x[0]: for i in 1..