Skip to content

Conversation

ringabout
Copy link
Member

@ringabout ringabout commented Oct 8, 2025

fixes #25208

type Conf = object
  val: int

const defaultConf = Conf(val: 123)
static:
  var conf: Conf
  conf = defaultConf
# opcLdConst is now always valid. We produce the necessary copy in the
# assignments now:

A opcLdConst is generated for defaultConf in conf = defaultConf. According to the comment above, we need to handle the copy for assignments of opcLdConst

@ringabout ringabout marked this pull request as draft October 8, 2025 15:03
@ringabout ringabout marked this pull request as ready for review October 8, 2025 15:07
@ringabout ringabout changed the title fixes #25208; VM issue with globals and assignments fixes #25208; generates a copy for opcLdConst in the assignments Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VM issue with globals and assignments

1 participant