I did wonder about that, but wasn't sure how it would affect things where inheritance is concerned. I dare ask, do you have an example of a class method that you would consider pure?
And yes, object methods can't be pure because accessing the fields of the current object (Self) is internally dereferencing a pointer . Gareth aka. Kit On Sat 28/07/18 18:14 , "Sven Barth" pascaldra...@googlemail.com sent: J. Gareth Moreton schrieb am Sa., 28. Juli 2018, 18:49: Another little progress update with implementing pure functions. 1. In my code (not submitted yet), the compiler now recognises and accepts the 'pure' directive. There are a number of other directives that it can't be used with ('noreturn' being one of them) and it can't be used on object methods. You could allow it for static class methods which don't have a Self argument and are essentially scoped ordinary routines. Regards, Sven
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel