Delphi-PRAXiS
Seite 6 von 7   « Erste     456 7      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Klatsch und Tratsch (https://www.delphipraxis.net/34-klatsch-und-tratsch/)
-   -   Neuer FixInsight ist da! (https://www.delphipraxis.net/183874-neuer-fixinsight-ist-da.html)

Roman Yankovsky 28. Mär 2015 14:06

AW: Neuer FixInsight ist da!
 
It supports all Delphi versions from Delphi 2006 to XE7.

Roman Yankovsky 14. Apr 2015 14:27

AW: Neuer FixInsight ist da!
 
... to XE8 :)

Der schöne Günther 28. Mai 2015 12:35

AW: Neuer FixInsight ist da!
 
Please have a look at
http://www.delphipraxis.net/1303391-post1.html

Is it possible for FixInsight to raise a W1037? Dcc32 and Dcc64 fail to do so.

Roman Yankovsky 18. Jun 2015 21:11

AW: Neuer FixInsight ist da!
 
Nice idea, thanks.
I will think about implementing this.

Der schöne Günther 2. Jul 2015 08:30

AW: Neuer FixInsight ist da!
 
Just noticed: You raise a W523 "Interface declared without a GUID" for generic interfaces. Generic interfaces cannot have a GUID.

And by the way: I believe a W504 (Missing INHERITED call in constructor/destructor) is not appropriate for a record constructor since they don't support inheritance in the first place.

Stevie 2. Jul 2015 09:51

AW: Neuer FixInsight ist da!
 
Zitat:

Zitat von Der schöne Günther (Beitrag 1307429)
Generic interfaces cannot have a GUID.

They can - their use is just limited because all instantiations have the same GUID - which can be dangerous but also useful when you know what you are doing.
However Roman might want to disable triggering that warning for generic interfaces.

Whookie 2. Jul 2015 11:15

AW: Neuer FixInsight ist da!
 
Nice idea, gave it a short try and here are my first expiriences:

W522 does enforce "override" to be written in lower case (which is not required)
W521 gives an error with:
Delphi-Quellcode:
function test: boolean;
var
  LResult: Boolean;
begin
  try
    LResult := TRUE;
  finally
    Result := LResult;
  end;
end;
W504 does warn on missing inherited in a constructor directly derived from TObject (even though it might be good practice(?)) I never call them in that circumstance.

Der schöne Günther 2. Jul 2015 11:29

AW: Neuer FixInsight ist da!
 
Zitat:

Zitat von Whookie (Beitrag 1307457)
even though it might be good practice(?) I never call them in that circumstance.

I always explicitly derive from
Delphi-Quellcode:
TObject
and call the (empty) inherited constructor. Java, for example, is different: It implicitly calls the inherited parameterless constructor (if there's any). Otherwise, it's a compile time error.

Another reason is that it often happened to me that I omitted the (then redundant) call to the super constructor but later decided to derive the class from something other than
Delphi-Quellcode:
TObject
. Then, it's easy to miss adding the call to the inherited constructor back in. (FixInsight to the rescue! 8-))

Whookie 2. Jul 2015 17:19

AW: Neuer FixInsight ist da!
 
Zitat:

Zitat von Der schöne Günther (Beitrag 1307459)
...but later decided to derive the class from something other than
Delphi-Quellcode:
TObject
. Then, it's easy to miss adding the call to the inherited constructor back in. (FixInsight to the rescue! 8-))

That's one hell of an argument...

Der schöne Günther 20. Jul 2015 11:59

AW: Neuer FixInsight ist da!
 
Zitat:

Zitat von Der schöne Günther (Beitrag 1307429)
And by the way: I believe a W504 (Missing INHERITED call in constructor/destructor) is not appropriate for a record constructor since they don't support inheritance in the first place.

Also, whether class helpers should be checked for a missing "inherited" call in the constructor is also debatable. An "inherited" statement in a class helper constructor is illegal.


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:30 Uhr.
Seite 6 von 7   « Erste     456 7      

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz