nielsAD / lape

Scripting engine with Pascal-like syntax for FPC and Delphi
112 stars 26 forks source link

Remove constref methods - constant self is now a variable copy #175

Closed ollydev closed 2 years ago

ollydev commented 2 years ago

FPC style - make a copy of Self if it's a constant. This is done the same way "normal" method parameters are handled so beware with types that are passed by references such as dyn arrays.

Behavior is a bit less obvious, but still makes sense and most importantly removes all the constref crazyness. No tests failed so at a high level nothing breaks. (aside from removing constref from headers)

@nielsAD