This commit is contained in:
ringabout
2026-04-02 16:53:19 +08:00
parent b0081000e1
commit 251956b064

View File

@@ -784,7 +784,10 @@ proc procParamTypeRel(c: var TCandidate; f, a: PType): TTypeRelation =
# if f is metatype.
result = typeRel(c, f, a)
if result == isEqual and not sameBackendTypePickyAliases(f, a):
if result == isEqual and
not containsGenericType(f) and not containsGenericType(a) and
not containsUnresolvedType(f) and not containsUnresolvedType(a) and
not sameBackendTypePickyAliases(f, a):
result = isNone
if result <= isSubrange or inconsistentVarTypes(f, a):