Hi everyone,

Why does the following compile:
    
    
    import future
    
    echo lc[x+2 | (x <- 1..10), int]
    

to give
    
    
    @[3, 4, 5, 6, 7, 8, 9, 10, 11, 12]
    

but
    
    
    import future
    
    echo lc[x^2 | (x <- 1..10), int]
    

gives a compilation error:
    
    
    Error: type mismatch: got (int, int literal(2))
    but expected one of:
    proc `^`(x: int): int
    proc `^`[T](x: int; y: openArray[T]): int
    > Process terminated with exit code 1
    

Reply via email to