Skip to content

Commit

Permalink
ignore default values
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Oct 15, 2024
1 parent 69c0946 commit 95e1c02
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions compiler/semstmts.nim
Original file line number Diff line number Diff line change
Expand Up @@ -2470,6 +2470,9 @@ proc semProcAux(c: PContext, n: PNode, kind: TSymKind,
addInterfaceDeclAt(c, declarationScope, s)
if sfExported in s.flags: # also implies top level
for i in 1 ..< s.typ.len:
if s.typ.n[i].kind == nkSym and s.typ.n[i].sym.ast != nil:
# has default value, ignore
continue
let t = nominalRoot(s.typ[i])
if t != nil and t.owner == s.owner:
# parameter `i` is a nominal type in this module
Expand Down

0 comments on commit 95e1c02

Please sign in to comment.