hello

example
    
    
      Vtest = ref object
        name : string
    
    let fldx = new(Vtest)
    fldx.name = "test"
    
    
    proc setT( val : string) :string=  return val
    
    var x = setT(fldX.name)
    
    
    Hint: passing 'fldx.name' to a sink parameter introduces an implicit copy; 
use 'move(fldx.name)' to prevent it [Performance]
    
    
    var x = setT(move(fldX.name))  not erreur   --> oups variable ????
    
    var s = fldX.name
    
    var x = setT(move(s)) not erreur 
    
    Run

nim c -f --deadCodeElim:on --gc:arc ....

please can you explain to me or correct

Thank you

Reply via email to