View Issue Details

IDProjectCategoryView StatusLast Update
0029565LazarusIDEpublic2020-07-30 09:28
ReporterCyrax Assigned ToPascal Riekenberg  
PrioritynormalSeverityminorReproducibilityalways
Status assignedResolutionopen 
PlatformWindows OSServer 2008 R2 
Product Version1.5 (SVN) 
Summary0029565: [codetools] Procedural function variable which returns a class, with statement and "Find declaration" mishaps.
DescriptionTrying to execute "Find declaration" functionality inside with statement where the variable reference is procedural variable which returns a class instance, causes CodeTools error out with this message :
Codetools, Errors: 1
project1.lpr(19,8) Error: expression type must be class or record type


See Steps To Reproduce, Additional Information and attached project file for more info.
Steps To Reproduce1. Open attached file in Lazarus.
2. Go to line 19, column 8 and do "Find declaration".
3. Observe the error message in the message window.
Additional InformationFPC and Lazarus was built with these options:
Lazarus revision 51462 
FPC revision 33035 
 
FPC make commands: 
clean
all
install
OPT=-gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -dTEST_WIN32_SEH
COMPILER_OPTIONS=-gw2 -godwarfsets -godwarfmethodclassprefix -gl -O- -Xs- -Si- -vbq -dTEST_WIN32_SEH
OS_TARGET=win32
CPU_TARGET=i386
REVSTR=33035
UPXPROG=echo
IDE=1
NOWPOCYCLE=1
INSTALL_PREFIX=j:\free_pascal_and_lazarus_new4\fpc\i386\win32\binary\3.1.1\fpc_trunk\trunk
 
Lazarus make commands: 
clean
all
OPT=-gw2 -godwarfsets -godwarfmethodclassprefix -gl -gh -O- -Si- -vb -dHEAPTRC_WINDOW -dDBG_WITH_DEBUGGER_DEBUG
UPXPROG=echo
USESVN2REVISIONINC=0
Tagscodetools
Fixed in Revision
LazTarget
WidgetsetWin32/Win64
Attached Files

Relationships

related to 0036916 assignedPascal Riekenberg The right-click menu option "Find Declaration of <someidentifiername>" goes to the "forward" declaration. 

Activities

Cyrax

2016-02-01 10:27

reporter  

project1.zip (1,199 bytes)

Cyrax

2016-02-01 10:30

reporter   ~0089649

>Go to line 19, column 8 and do "Find declaration".
This should be line 20, column 5.

Cyrax

2016-04-02 02:31

reporter  

lazarus-debug.zip (2,642 bytes)

Cyrax

2016-04-02 02:32

reporter   ~0091659

Attached debug output (lazarus-debug.zip) from CodeTools.

Cyrax

2017-02-28 15:43

reporter   ~0098513

This bug still happens.

---

Lazarus 1.7 r54300

Cyrax

2019-02-26 02:14

reporter   ~0114448

Still a problem.

However, if I explicitly cast the result from the function to TObject type, then "Find declaration" routine works.

---

Lazarus 2.1.0 r60507

Issue History

Date Modified Username Field Change
2016-02-01 10:27 Cyrax New Issue
2016-02-01 10:27 Cyrax File Added: project1.zip
2016-02-01 10:28 Cyrax Tag Attached: codetools
2016-02-01 10:30 Cyrax Note Added: 0089649
2016-04-02 02:31 Cyrax File Added: lazarus-debug.zip
2016-04-02 02:32 Cyrax Note Added: 0091659
2017-02-28 15:43 Cyrax Note Added: 0098513
2019-02-26 02:14 Cyrax Note Added: 0114448
2020-04-15 10:39 Juha Manninen Relationship added related to 0036916
2020-07-30 09:28 Pascal Riekenberg Assigned To => Pascal Riekenberg
2020-07-30 09:28 Pascal Riekenberg Status new => assigned