Skip to content

Globals redefinition#2265

Merged
rorywalsh merged 2 commits intodevelopfrom
fix/globals
Sep 7, 2025
Merged

Globals redefinition#2265
rorywalsh merged 2 commits intodevelopfrom
fix/globals

Conversation

@vlazzarini
Copy link
Member

@vlazzarini vlazzarini commented Sep 6, 2025

An issue, reported by @rorywalsh, arose with the recently-introduced backwards compatibility code (#2261) where any global variables starting with an implicit type letter would be redefined as an (implicit-type) local when assigned locally. This was because the new code was applying the rule to all, when it should have selected only the global readonly vars added by the compiler (opcode and instrument names). This PR fixes the problem. Implicit globals always start with 'g' and none of the shadowing/redefinition rules are relevant in relation to them.

@vlazzarini vlazzarini requested a review from rorywalsh September 6, 2025 16:45
@rorywalsh rorywalsh merged commit d690863 into develop Sep 7, 2025
47 of 54 checks passed
@rorywalsh rorywalsh deleted the fix/globals branch September 7, 2025 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants