[fpc-devel] Re: (class) helper questions

Sven Barth pascaldragon at googlemail.com
Sun Mar 13 11:26:13 CET 2011


I have now reported the possible bugs I've encountered at Embarcadero's 
Quality Central.

In detail those are the following:

1. (strict) private nested helpers are available outside the "(strict) 
private" scope ( http://qc.embarcadero.com/wc/qcmain.aspx?d=92259 )
2. tchlp91.pp does not compile in Delphi while in my opinion it should ( 
http://qc.embarcadero.com/wc/qcmain.aspx?d=92258 )
3. "class constructors" generate an internal error and also "class 
destructor" compiles ( not by me: 
http://qc.embarcadero.com/wc/qcmain.aspx?d=79057 )
4. "class helper for TSomeClass<SomeType>" does not work ( not by me: 
http://qc.embarcadero.com/wc/qcmain.aspx?d=71890 )

I'll wait a few days for the results on these issues, but as the bottom 
two are already open for some time I'd like to know how I should proceed 
regarding these (and possible also the first two, as they might take 
their time as well ^^ ).

The current state is the following:
1. nested helpers are not yet searched at all (I'll change that in the 
next time when I implement the new search algorithm)
2. the test compiles in FPC
3. "class constructor/destructor" is forbidden for helpers
4. this works in FPC

In the next days I'll work on implementing Jonas' idea regarding a hash 
list in tmodule. Here I'd like to know how I should proceed regarding 
TSymtableStack.

As I don't think it's a good idea to put the handling in TSymtableStack 
itself I basically have the following solutions left:
* add events that are triggered on push/pop to TSymtableStack
* make push/pop virtual methods and subclass TSymtableStack

In the first case I might need to introduce a "factory function" that 
creates an TSymtableStack and sets up the two events. In the second case 
we need to agree that all symtablestacks (maybe except the stacks for 
macros) must now be created as the new subclass.

Hmm... rereading what I wrote above I personally would go for the second 
solution.

Regards,
Sven




More information about the fpc-devel mailing list