Grant Jacobs wrote:
I feel mean suggesting work for you, but another low priority warning/error message thing...
Any merit in a warning message (not an error) if a unit name differs from its filename? If you do something like:
Unit1:
uses GHJ_AAConsensus;
Unit2, named 'GHJ_AAConsensus.pas'
unit Consensus;
On compiling Unit1, you get a compile-time message like:
module/unit `ghj_aaconsensus2' could not be compiled
which is pretty broad!
I imagine many users would use the same name for the unit as to the file as if nothing else its easy to locate the file if they have the same name, so a warning if they differ might be useful?
It'd be a bit of a bonus really as its a "useability" thing not a bug fix.
OK (`-W[no-]interface-file-name', not on by default or with `-Wall'). ("Interface" because for modules it will apply to the interface names which is where it matters, and which might be distinct from the module name. For units it's the same.)
Frank