Skip to content

Commit

Permalink
Tests(sigmatch): Add tests for overloaded symbols for varargs[typed]
Browse files Browse the repository at this point in the history
This is only for macros as of now becasue I don't know what to do about
non macro routines
  • Loading branch information
ynfle committed Feb 3, 2022
1 parent 776c999 commit 0bc1c91
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/compiler/tsigmatch.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
discard """
nimout: '''nnkClosedSymChoice
nnkSym
'''
"""
# import sequils

import macros

# block testVarargsOverloadedSymbolResolution:
#
# echo @[1, 2, 3].map(len)

block testTypedVarargsOverloadedSymbolResolution:

macro typedVarargs(x: varargs[typed]) =
echo x[0].kind

macro typedSingle(x: typed) =
echo x.kind

typedSingle(`@`)
typedVarargs(`@`)

0 comments on commit 0bc1c91

Please sign in to comment.