diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 31b3770459d71..40da501b93792 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1411,7 +1411,7 @@ proc semSym(c: PContext, n: PNode, sym: PSym, flags: TExprFlags): PNode = elif s.ast != nil: result = semExpr(c, s.ast) else: - n.typ() = s.typ + n.typ() = makeTypeDesc(c, s.typ) return n of skType: if n.kind != nkDotExpr: # dotExpr is already checked by builtinFieldAccess diff --git a/tests/tuples/tgenericparamtypetuple.nim b/tests/tuples/tgenericparamtypetuple.nim new file mode 100644 index 0000000000000..6701a44e781c6 --- /dev/null +++ b/tests/tuples/tgenericparamtypetuple.nim @@ -0,0 +1,6 @@ +# issue #25312 + +import heapqueue + +proc failingTest[T](test: HeapQueue[(float, T)]) = # (Compile) Error: Mixing types and values in tuples is not allowed. + discard