View Issue Details

IDProjectCategoryView StatusLast Update
0033221FPCCompilerpublic2020-01-23 22:32
ReporterZoran VučenovićAssigned ToFlorian 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.1.1Product Build38304 
Target VersionFixed in Version3.3.1 
Summary0033221: Duplicate locals doesn't allow that local variables have same name as class members.
Description1.
  - In Delphi mode method parameters can have same name as class members.
  - In ObjFpc mode method parameters cannot have same name as class members.
This can be changed by adding {$modeswitch duplicatelocals}...

However,
2.
  - In Delphi mode local variables in methods can have same name as class members.
  - In ObjFpc mode local variables in methods cannot have same name as class members.
Unlike (1), this cannot be changed with {$modeswitch duplicatelocals}!
Steps To ReproducePlease see the example in forum: https://forum.lazarus.freepascal.org/index.php/topic,40220.0.html
TagsNo tags attached.
Fixed in Revision44028
FPCOldBugId
FPCTarget-
Attached Files

Relationships

related to 0024963 closedJonas Maebe Duplicate identifier for class var and method in class 

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2018-02-24 20:56 Zoran Vučenović New Issue
2018-02-24 23:25 Maciej Izak Relationship added related to 0024963
2020-01-23 22:32 Florian Assigned To => Florian
2020-01-23 22:32 Florian Status new => resolved
2020-01-23 22:32 Florian Resolution open => fixed
2020-01-23 22:32 Florian Fixed in Version => 3.3.1
2020-01-23 22:32 Florian Fixed in Revision => 44028
2020-01-23 22:32 Florian FPCTarget => -