Skip to content

Commit

Permalink
take that
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout committed Sep 18, 2022
1 parent befb485 commit 425cc30
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions compiler/semcall.nim
Original file line number Diff line number Diff line change
Expand Up @@ -482,9 +482,11 @@ proc inferWithMetatype(c: PContext, formal: PType,
# This almost exactly replicates the steps taken by the compiler during
# param matching. It performs an embarrassing amount of back-and-forth
# type jugling, but it's the price to pay for consistency and correctness
# result.typ = generateTypeInstance(c, m.bindings, arg.info,
# formal.skipTypes({tyCompositeTypeClass}))
result.typ = arg.typ
if formal.kind == tyUserTypeClass:
result.typ = arg.typ
else:
result.typ = generateTypeInstance(c, m.bindings, arg.info,
formal.skipTypes({tyCompositeTypeClass}))
else:
typeMismatch(c.config, arg.info, formal, arg.typ, arg)
# error correction:
Expand Down

0 comments on commit 425cc30

Please sign in to comment.