diff --git a/compiler/types.nim b/compiler/types.nim index 85b0f9ed0b..3ace332267 100644 --- a/compiler/types.nim +++ b/compiler/types.nim @@ -250,7 +250,7 @@ proc containsObject(t: PType): bool = proc isObjectWithTypeFieldPredicate(t: PType): bool = result = t.kind == tyObject and t.sons[0] == nil and - not (t.sym != nil and sfPure in t.sym.flags) and + not (t.sym != nil and {sfPure, sfInfixCall} * t.sym.flags != {}) and tfFinal notin t.flags proc analyseObjectWithTypeFieldAux(t: PType,