-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
Update: @krux02 has found this happens when constraints are specified. When the constraints are removed the code will compile.
the code below fails with: Error: cannot instantiate Data got: <type int, type float64> but expected: <T: SomeNumber, U: SomeNumber>
type
Element*[U:SomeNumber] = ref object
value*: U
Data*[T:SomeNumber, U:SomeNumber] = ref object
xs*: seq[T]
e*: Element[U]
var e = Element[float64](value:2'f64)
var xs = new_seq[int](10)
var d = Data[int, float64](xs:xs, e:e)