Skip to content

Commit b80d293

Browse files
authored
close #12704 by adding a test (tuple codegen error) (#13592)
* close #12704 by adding a test * move test to tests/metatype/ttypedesc2.nim
1 parent cb0f7c5 commit b80d293

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/metatype/ttypedesc2.nim

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,23 @@ type Point[T] = tuple[x, y: T]
3535
proc origin(T: typedesc): Point[T] = discard
3636
discard origin(int)
3737
38+
block: # issue #12704
39+
const a = $("a", "b")
40+
proc fun() =
41+
const str = $int
42+
let b = $(str, "asdf")
43+
fun()
44+
3845
# https://github.com/nim-lang/Nim/issues/7516
3946
import typetraits
4047
48+
block: #issue #12704
49+
const a = $("a", "b")
50+
proc fun() =
51+
const str = name(int)
52+
let b = $(str, "asdf")
53+
fun()
54+
4155
proc hasDefault1(T: type = int): auto = return T.name
4256
doAssert hasDefault1(int) == "int"
4357
doAssert hasDefault1(string) == "string"

0 commit comments

Comments
 (0)