Skip to content

Commit

Permalink
try remove if branch
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Aug 16, 2024
1 parent 2f98191 commit c767e45
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions compiler/semtypes.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit c767e45

Please sign in to comment.