Resolve constant assignments by scope and skip overwrites #23

Open
unkin-agent wants to merge 2 commits from benvin/gentypes-guard-constants into benvin/gentypes-guard-regex
Member

A constant assignment binds its name in the lexical scope, and overwriting an existing constant only warns while replacing it for every later reader. w10k checked bare names against a fixed list, so module Puppet; Util = 1 generated where puppet breaks, and a harmless top-level Type = 1 skipped.

  • resolve each assignment to its full name and skip when openvox or any loaded file already defines it
  • share constants across the files one world loads
  • treat X ||= v as depending on other inputs, and opening a value constant as a class or module as an error
  • bump gentypes.Version to 17
A constant assignment binds its name in the lexical scope, and overwriting an existing constant only warns while replacing it for every later reader. w10k checked bare names against a fixed list, so `module Puppet; Util = 1` generated where puppet breaks, and a harmless top-level `Type = 1` skipped. - resolve each assignment to its full name and skip when openvox or any loaded file already defines it - share constants across the files one world loads - treat `X ||= v` as depending on other inputs, and opening a value constant as a class or module as an error - bump gentypes.Version to 17
unkin-agent added 1 commit 2026-11-10 00:13:56 +11:00
Resolve constant assignments by scope and skip overwrites
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
8eddf844c4
A constant binds its name in the lexical scope and replacing an existing one
changes it for every later reader, so the full name is checked against
openvox's and every loaded file's constants, which one world now shares.
X ||= v depends on what other inputs defined, and a value constant is not
a class or module.
unkin-agent added 1 commit 2026-11-10 00:16:27 +11:00
Merge remote-tracking branch 'origin/benvin/gentypes-guard-regex' into benvin/gentypes-guard-constants
ci/woodpecker/pr/build Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
306397353f
This repo is archived. You cannot comment on pull requests.