[fpc-devel] "helper" feature finished
pascaldragon at googlemail.com
Wed Apr 6 21:31:46 CEST 2011
On 06.04.2011 14:24, Sven Barth wrote:
> Am 06.04.2011 13:35, schrieb Florian Klaempfl:
>> Am 05.04.2011 17:34, schrieb Sven Barth:
>>> Am 05.04.2011 17:06, schrieb Florian Klaempfl:
>>>> Am 05.04.2011 04:27, schrieb Paul Ishenin:
>>>>> I think your branch should be reviewed either by Florian
>>>> I did a quick review and found nothing important, only a few remarks:
>>>> - current_syssym: is it really needed? Can't the type checking be done
>>>> during the type check pass? If it's needed, it should be reset to 0
>>>> somewhere during parser initialization because in case of a fatal error
>>>> when the compiler is compiled into an ide, at the next start
>>>> current_syssym would have a wrong value.
>>> The problem is that basically all references to class helpers are
>>> forbidden except inside of SizeOf and TypeInfo (and BitSizeOf). Thus
>>> when one of those symbols is encountered the checks against the use of a
>>> class helper type reference are already "active". So the only way out I
>>> have found was the introduction of that current_syssym variable to check
>>> whether I'm currently inside one of those three functions. If you have
>>> an idea how to solve this with by using the type check pass I'll be glad
>>> to do so.
>> Just let me ask different: what code compiles, if the check is not here?
>> The expressions accepting a type node but not a class helper should be
>> easily fixable.
> If I remember correctly (and my comment at the location is correct which
> I hope it is ^^) the case should be the following:
> But I'll recheck that later to be sure.
Yes, I was right.
When I disable the check that uses current_syssym the only test that
fails is that for the case mentioned in the above mail.
More information about the fpc-devel