summary refs log tree commit diff stats
path: root/tests/trmacros/tpatterns.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/trmacros/tpatterns.nim')
-rw-r--r--tests/trmacros/tpatterns.nim23
1 files changed, 0 insertions, 23 deletions
diff --git a/tests/trmacros/tpatterns.nim b/tests/trmacros/tpatterns.nim
deleted file mode 100644
index 907973637..000000000
--- a/tests/trmacros/tpatterns.nim
+++ /dev/null
@@ -1,23 +0,0 @@
-discard """
-  output: '''48
-hel
-lo'''
-"""
-
-template optZero{x+x}(x: int): int = x*3
-template andthen{`*`(x,3)}(x: int): int = x*4
-template optSubstr1{x = substr(x, a, b)}(x: string, a, b: int) = setlen(x, b+1)
-
-var y = 12
-echo y+y
-
-var s: array[0..2, string]
-s[0] = "hello"
-s[0] = substr(s[0], 0, 2)
-
-echo s[0]
-
-# Test varargs matching
-proc someVarargProc(k: varargs[string]) = doAssert(false) # this should not get called
-template someVarargProcSingleArg{someVarargProc([a])}(a: string) = echo a
-someVarargProc("lo")
2ff8ee3c051'>^
84965d6 ^

80e891a ^

a073d76 ^



84965d6 ^

a073d76 ^







84965d6 ^

a073d76 ^


6728a11 ^
a073d76 ^











e591221 ^



80e891a ^
a073d76 ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92