I thought fields could only iterate over element of the same type. If not, how 
do you use fields to iterate over fields of 2 different type ?
    
    
    type
      FooObj = object
        field1: Tensor[float]
        field2: Table[string, float]
        field3: int
      Model = object
        field1: string
        field2: string
        field3: int
    
    var model: Model
    var foo: FooObj
    
    for name, t, m in fieldPairs(model, foo):
       echo name, t, $m
    
    
    Run

I get an error `type mismatch: got <FooObj> but expected 'Model = object`

Reply via email to