I ran into this problem with Nim Compiler Version 2.2.0.
Is this expected behaviour or a bug?
import heapqueue
proc test1[T](test: (float, T)) = # Works
discard
proc test2[T](test: seq[(float, T)]) = # Works
discard
proc test3[T](test: HeapQueue[tuple[sqd: float, data: T]]) = # Works
discard
proc test4(test: HeapQueue[(float, float)]) = # Works
discard
type ExampleObj = object
a: string
b: seq[float]
proc test5(test: HeapQueue[(float, ExampleObj)]) = # Works
discard
proc failingTest[T](test: HeapQueue[(float, T)]) = # (Compile) Error: Mixing types and values in tuples is not allowed.
discard
Could be me misunderstanding something but I would expect the last line to compile. Apoligies if this has already been adressed in later nim versions.