[fpc-devel] Generic keywords mode switch

Hairy Pixels genericptr at gmail.com
Mon Jun 13 05:30:45 CEST 2022


Me and Sven had planned this a couple years ago and I finally got around to it this weekend since it was pretty trivial. The reason for this being we wanted a way to disable the generic keywords in ObjFPC mode. The solution is to decouple the keywords from the ObjFPC mode and put them under a mode switch.

Basically now the generic and specialize keywords are enabled via the generickeywords mode switch, which is implicitly enabled in ObjFPC mode and can be disabled using {$modeswitch generickeywords-}. Technically they can be enabled in Delphi mode also although maybe this should be illegal.

I ran all the tests which still pass but I'm very nervous about this introducing regressions so it will need a good review. :)

https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/240

Regards,
	Ryan Joseph



More information about the fpc-devel mailing list