-
-
Notifications
You must be signed in to change notification settings - Fork 47
Open
Description
In the following code, when the codeblock is created with an string var cb2 := &("{|osql| NTrim(osql:RecCount)}") the execution calls the setter of RecCount. Expected is only a call to the getter
class Test
private _val := 1 as int
public property RecCount as int
get
Console.WriteLine(ei"RecCount get: {_val}")
return _val
end get
protected set
Console.WriteLine(ei"RecCount set: {value}")
_val := value
end set
end property
method NoIVarPut(symField, xValue) as usual clipper
Console.WriteLine(ei"NoIVarPut: {AsString(symField)},{AsString(xValue)}")
return nil
end class
function Start() as void strict
var osql := Test{}
// Works fine
var cb1 := {|osql| NTrim(osql:RecCount)}
var res1 := Eval(cb1, osql)
// Calls first the getter and then the setter of RecCount, which is not expected
var cb2 := &("{|osql| NTrim(osql:RecCount)}")
var res2 := Eval(cb2,osql)
Console.ReadLine()
returnReactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels