Recent

Author Topic: [SOLVED] Issue with precedence of a duplicate identifier in 2 different Units  (Read 3427 times)

Thaddy

  • Hero Member
  • *****
  • Posts: 18344
  • Here stood a man who saw the Elbe and jumped it.
Re: Issue with precedence of a duplicate identifier in 2 different Units
« Reply #30 on: September 30, 2025, 06:46:59 am »
I don't understand what this has to do with this Topic. And writing that you reported a bug does not help us without posting it's link. ;)
It is completely ON topic. related to JCF and code tools and the link is:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40756

It relates to - unintentionally - breaking precedence when sorting the uses clause is out of order, which is exactly your case.
I mean, this is not related to sorting only, it is about the order.
« Last Edit: September 30, 2025, 06:49:25 am by Thaddy »
Due to censorship, I changed this to "Nelly the Elephant". Keeps the message clear.

Hartmut

  • Hero Member
  • *****
  • Posts: 1007
Re: Issue with precedence of a duplicate identifier in 2 different Units
« Reply #31 on: September 30, 2025, 10:26:03 am »
I'll make it quick as most has been said already: the compiler's behavior is the correct one here.

Thank you very much PascalDragon for to have this unambiguous and reliable answer.

I will file a bug report for the Code Tools and improve the "official documentation" accordingly, but I will need some days for it.

n7800

  • Hero Member
  • *****
  • Posts: 554
  • Lazarus IDE contributor
    • GitLab profile
Re: Issue with precedence of a duplicate identifier in 2 different Units
« Reply #32 on: October 05, 2025, 02:42:19 pm »
I will file a bug report for the Code Tools and improve the "official documentation" accordingly, but I will need some days for it.

Thank you for creating the report. Next time, please provide a link to it: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41857

For example, when you create a report for documentation (as far as I can tell, it doesn't exist yet).

Hartmut

  • Hero Member
  • *****
  • Posts: 1007
I only was not "quick" enough for you... Now I have it all finished:
 - CodeTools bug report = https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41857
 - Wiki improvement = https://wiki.freepascal.org/Unit#Exception_from_above_rule_%22the_last_unit_wins%22
 - Documentation improvement = https://gitlab.com/freepascal.org/fpc/documentation/-/issues/39460

 

TinyPortal © 2005-2018