Error message for error 3339 ("global generic references static") does not point to the offending line in question
Original Reporter info from Mantis: Bart @flyingsheep
-
Reporter name: Bart Broersma
Original Reporter info from Mantis: Bart @flyingsheep
- Reporter name: Bart Broersma
Description:
The errormessage "Error: (3339) Generic template in interface section references symbol in implementation section always" point to the "end;" of the generic method that calls the "forbidden" symbol, not to the offending line in that method.
This is a bit confusing (less so now, since the errormessage was made more clear in r48125) if you have no clue what the actual error is that you made.
Steps to reproduce:
Compile the attached simple program with "fpc -vq ermsg.lpr" and you get:
"ugenerr.pp(76,4) Error: (3339) Generic template in interface section references symbol in implementation section"
The actual offending code is in line 27 of that unit, ans on my laptop it is not in my view if I scroll to line 76 (or the Lazarus IDE does that automaticaaly for me).
Additional information:
Discussed with Sven on the fpc-devel list.
Priority low, since the error message is now more self explanatory.
Mantis conversion info:
- Mantis ID: 38342
- OS: Windows
- OS Build: 10
- Build: 48092
- Platform: i386
- Version: 3.3.1