View Issue Details

IDProjectCategoryView StatusLast Update
0038342FPCCompilerpublic2021-01-11 14:24
ReporterBart Broersma Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Platformi386OSWindows 
Product Version3.3.1 
Summary0038342: Error message for error 3339 ("global generic references static") does not point to the offending line in question
DescriptionThe 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 ReproduceCompile 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 InformationDiscussed with Sven on the fpc-devel list.
Priority low, since the error message is now more self explanatory.
Tagsgenerics
Fixed in Revision
FPCOldBugId
FPCTarget-
Attached Files

Activities

Bart Broersma

2021-01-10 19:59

reporter  

msg3339.zip (910 bytes)

Issue History

Date Modified Username Field Change
2021-01-10 19:59 Bart Broersma New Issue
2021-01-10 19:59 Bart Broersma File Added: msg3339.zip
2021-01-11 14:22 Sven Barth Tag Attached: generics
2021-01-11 14:24 Sven Barth Summary Error message for error 3339 does not point to the offending line in question => Error message for error 3339 ("global generic references static") does not point to the offending line in question
2021-01-11 14:24 Sven Barth FPCTarget => -