From c767e453825614f6db850d368bf1b3eac5614b14 Mon Sep 17 00:00:00 2001 From: metagn <10591326+metagn@users.noreply.github.com> Date: Mon, 25 Mar 2024 18:22:53 +0300 Subject: [PATCH] try remove if branch --- compiler/semtypes.nim | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/semtypes.nim b/compiler/semtypes.nim index 2977e64f76b82..81293e2c3a74e 100644 --- a/compiler/semtypes.nim +++ b/compiler/semtypes.nim @@ -2040,11 +2040,7 @@ proc semTypeNode(c: PContext, n: PNode, prev: PType): PType = elif op.s == "owned" and optOwnedRefs notin c.config.globalOptions and n.len == 2: result = semTypeExpr(c, n[1], prev) else: - if c.inGenericContext > 0 and n.kind in nkCallKinds: - let n = semGenericStmt(c, n) - result = makeTypeFromExpr(c, n.copyTree) - else: - result = semTypeExpr(c, n, prev) + result = semTypeExpr(c, n, prev) of nkWhenStmt: var whenResult = semWhen(c, n, false) if whenResult.kind == nkStmtList: whenResult.transitionSonsKind(nkStmtListType)