"Identifier not found" when qualifying identifier with unit name that is a namespace as well
Original Reporter info from Mantis: PeterJanRoes
-
Reporter name: Peter-Jan Roes
Original Reporter info from Mantis: PeterJanRoes
- Reporter name: Peter-Jan Roes
Description:
When unit A tries to qualify a symbol from unit B with its unit name, and that unit name equals both the first namespace of unit A and of another unit C, and that unit C is also in the uses list of unit A, then the qualified symbol cannot be found and the compiler emits "Identifier not found".
Either renaming unit A to exclude the namespace, or removing unit C from the uses list, or removing the namespace from the qualified symbol removes the problem.
Steps to reproduce:
I have included a test project that exposes the problem. Here the namespace is called "Namespace":
Unit A: Namespace.Test.pas
Unit B: Namespace.pas
Unit C: Namespace.WithDot.pas
Unit "Namespace.Test" tries to access symbol "ExecuteTest" from "Namespace.pas" using the qualified identifier "Namespace.ExecuteTest" and this fails.
Mantis conversion info:
- Mantis ID: 25059
- Fixed in version: 3.0.0
- Fixed in revision: 25560 (#ce6c8c1b)
- Monitored by: » PeterJanRoes (Peter-Jan Roes)