Or you can specify the type for (1, 1):
    
    
    let x: 1..2 = 1
    let expected: (range[1..2]) = (1)
    let expected2: (range[1..2], int) = (1, 1)
    
    doAssert x == 1
    doAssert (x) == expected
    doAssert (x, 1) == expected2
    
    echo typeof(expected)         # range 1..2(int)
    echo typeof(expected2)        # (range 1..2(int), int)
    
    
    
    Run

Reply via email to