KDE/kdevplatform/language/duchain

Andreas Pakulat apaku at gmx.de
Mon Feb 16 16:06:00 UTC 2009


On 16.02.09 14:50:12, Milian Wolff wrote:
> SVN commit 927003 by mwolff:
> 
> make isConstructor and isDestructor virtual since the current implementation is cpp specific and needs to be adapted e.g. for PHP
> 
>  M  +2 -2      classfunctiondeclaration.h  
> 
> 
> --- trunk/KDE/kdevplatform/language/duchain/classfunctiondeclaration.h #927002:927003
> @@ -90,8 +90,8 @@
>    bool isFinal() const;
>    void setIsFinal(bool);
>    
> -  bool isConstructor() const;
> -  bool isDestructor() const;
> +  virtual bool isConstructor() const;
> +  virtual bool isDestructor() const;

Looking at the implementation of the constructor and even more so the
destructor variant of these two I wonder wether they should do anything at
all by default. The current implementation in duchain only works for C++
(well, the constructor also works for java by accident), but all other
languages I've used have totally different ways of identifying constructors
and destructors (if they even have any). So maybe by the default these
should return false and the languages should provide their own
implementation?

Andreas

-- 
You will be given a post of trust and responsibility.




More information about the KDevelop-devel mailing list