> On Wed, Jul 16, 2008 at 9:40 AM, Daniël Mantione > <[EMAIL PROTECTED]> wrote: >> I think there can be two visions here: >> - Include is not a real procedure, so this internal implementation detail >> should be hidden and this can/should be allowed; the >> compiler internally should convert it into set:=set+[member]. > > I think this would be ideal. Using Include() is much cleaner than set > := set + [member]. And yes I understand that as it was implement, you > could circumvent the getter/setter, but I believe it's something the > compiler must handle correctly. > > It's easy for me (from a developers point of view <wink>) to say, but > I think that it's up to the compiler to resolve the issue at hand. > It's not the job of the developer to change all existing code. Surely > the compiler must be able to detect if set is a property or field > variable. If it's a property, resolve the call to set := set + > [member] > > As it stands now, FPC 2.3.1 is going to break a LOT of code. Yes I > know it was maybe a unsafe way of using Include(), but surely the > compiler can handle it better. Thoughts?
At least the error message can be improved. Additional we can maybe introduce a new switch and reduce the error to a warning in case the property is a varaible only and not a procedure. Peter _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel