[fpc-pascal] Name collisions in scoped enums
    Sven Barth 
    pascaldragon at googlemail.com
       
    Mon May  4 07:40:43 CEST 2020
    
    
  
Am 04.05.2020 um 05:06 schrieb Ryan Joseph via fpc-pascal:
> I've been using scoped enums and noticed that I'm getting collisions with reserved keywords. Shouldn't these be allowed in scoped enums since they are required to be referenced using their type name as a prefix?
No, keywords have a higher priority than identifiers, their context 
doesn't matter (e.g. you can't have a method named "File" either though 
one could apply the same reasoning here). If you want to use keywords 
you have to escape them using "&".
Regards,
Sven
    
    
More information about the fpc-pascal
mailing list