Repository navigation
Replies: 1 comment
|
Update: the compiler side is done. Statement Expressions in Unleashed now match the upstream version 1:1 - That leaves the sync of the fork with trunk. Getting the feature itself aligned turned out to be simpler than expected, so the groundwork is in place. Pulling in the rest of the upstream commits will take a little longer, though - that part is not done yet and will land in a later step. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
A bit over a year after the merge request was opened (Jun 14, 2025), Statement Expressions have been merged into FPC trunk: https://gitlab.com/freepascal.org/fpc/source/-/merge_requests/1037
Unleashed Pascal picked this feature up from that merge request early on, so
if,caseandtryas expressions have been available here for a while. The version that got merged upstream differs a bit from what is in Unleashed right now. The main visible difference is syntax: acaseexpression with anelsebranch and atry-exceptexpression now close with theendkeyword, e.g.s := case x of 1: 'one'; else 'other' end;. In Unleashed theelseexpression is currently the last token and there is noend. Upstream also added anonymous functions as branch values, a wider set of result type unification rules (common class ancestor, interfaces,nilvs class, variants), dedicated error messages, and the modeswitch is on by default in{$mode delphi}.Plan: first I will update the Statement Expressions feature so it is 100% compatible with the FPC version (the
endclosing form incase/tryplus a couple of smaller things). After that, a full sync of the fork with FPC trunk. There are only about 300 upstream commits since the last sync point, most of them small fixes, so I do not expect trouble there.All reactions