system.string? What is it? Why is it? How do I get rid of it?
    
    
    func toLayer(layer: var Table[string, [seq[int]]], b:Box)=
      var k = ""
      for j in b.x..<b.w:
        k = K & $j & ","
        for i in b.y..<b.h:
          k = k & $i
          layer[k].add(b)
    
    for n in 0..<100:
      toLayer(layer, Box(
        x: rand(100),
        y: rand(100),
        w: rand(100),
        h: rand(100)
      ))
    
    
    Run

Error: type mismatch

Expression: toLayer(layer, Box(x: rand(100), y: rand(100), w: rand(100), h: 
rand(100)))
    [1] layer: Table[system.string, seq[int]] [2] Box(x: rand(100), y: 
rand(100), w: rand(100), h: rand(100)): Box

Expected one of (first mismatch at [position]): [1] func toLayer(layer: var 
Table[string, [seq[int]]]; b: Box)

Reply via email to