Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006485 [JEDI VCL] 00 JVCL Components major always 2016-01-06 04:35 2019-04-26 20:24
Reporter mator View Status public  
Assigned To
Priority normal Resolution open  
Status feedback   Product Version Daily / GIT
Summary 0006485: jvInterpreter cannot handle repeated uses
Description TestScript uses 'lib\Lib1' and 'lib\Lib2'
Lib1 uses 'lib\Lib2'

The jvInterpreter throws a duplicate identifier on whatever the first identifier is (constant, variable, or function) in Lib2.
Additional Information This can be fixed by adding a single line of code to jvInterpreter.pas -> procedure TJvInterpreterUnit.ReadUnit (starting at line 7964):

procedure TJvInterpreterUnit.ReadUnit(const UnitName: string);
  OldUnitName: string;
  OldSource: string;
  S: string;
  if FAdapter.UnitExists(UnitName) then
  FAdapter.AddSrcUnit(FCurUnitName, '', '');
  FAdapter.AddSrcUnit(UnitName, '', ''); // the line of code added

Adding this line of code simply prevents the jvInterpreter from attempting to call InterpretUnit on the same unit twice.
Tags No tags attached.
Attached Files

- Relationships

-  Notes
mator (reporter)
2016-01-17 18:49

I need to correct something here. The example I gave is actually a trivial example which can be resolved by changing the uses line to just

uses 'lib\Lib1';

A better example:

Lib1 uses Lib3
Lib2 uses Lib3


uses 'lib\Lib1', 'lib\Lib2';

Will always lead to a redeclared identifier error.
obones (administrator)
2018-07-18 15:36

Please provide the zipped sources of an application showing this.
mator (reporter)
2018-07-18 19:29

Hi obones,

Sorry but I've moved on from using Delphi/Jedi for development for my applications and won't be able to provide an example.

- Mator
mh (reporter)
2019-04-26 20:24

Created a pull request for this: [^]

- Issue History
Date Modified Username Field Change
2016-01-06 04:35 mator New Issue
2016-01-17 18:49 mator Note Added: 0021268
2018-07-18 15:36 obones Note Added: 0021478
2018-07-18 15:36 obones Status new => feedback
2018-07-18 19:29 mator Note Added: 0021558
2019-04-26 20:24 mh Note Added: 0021750

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker