Because of processing tuple by element by element, tried calling for-loop (by 
fields iterator).

My expectation is that the element in for-loop cannot be assined to (the 
original object should be read-only and should not be rewritten).

But it seems like going fine.

ex) 
    
    
    var tmp1 = @[1,2,3,4,5]
    for x in temp1:
      x = 10  # doesn't work  <- as expected
    
    var tmp2 = (1,2,3,4,5)
    for x in temp2:
      x = 10  # works  <- ?
    echo temp2  # (10,10,10,10,10)
    
    
    Run

Is this a Nim's specification? (or bug?)

Reply via email to