Skip to content

Commit 6a1e4ea

Browse files
committed
test producing typedesc type for generic param in semSym
1 parent 0486a2d commit 6a1e4ea

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

compiler/semexprs.nim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ proc semSym(c: PContext, n: PNode, sym: PSym, flags: TExprFlags): PNode =
14111411
elif s.ast != nil:
14121412
result = semExpr(c, s.ast)
14131413
else:
1414-
n.typ() = s.typ
1414+
n.typ() = makeTypeDesc(c, s.typ)
14151415
return n
14161416
of skType:
14171417
if n.kind != nkDotExpr: # dotExpr is already checked by builtinFieldAccess
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# issue #25312
2+
3+
import heapqueue
4+
5+
proc failingTest[T](test: HeapQueue[(float, T)]) = # (Compile) Error: Mixing types and values in tuples is not allowed.
6+
discard

0 commit comments

Comments
 (0)