Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2022-06

Generic keywords mode switch

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Hairy Pixels

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

Reply by email

Sven Barth
to Hairy Pixels

Hairy Pixels schrieb am Mo., 13. Juni 2022, 05:30:

Show quoted text 15 lines
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

This won't be added until I've implemented the backwards compatible type overloading in non-Delphi modes.

Regards,
Sven

Reply by email