Skip to content

Auto promote when creating constants inside namespace#622

Merged
vinistock merged 1 commit intomainfrom
03-02-auto_promote_when_creating_constants_inside_namespace
Mar 4, 2026
Merged

Auto promote when creating constants inside namespace#622
vinistock merged 1 commit intomainfrom
03-02-auto_promote_when_creating_constants_inside_namespace

Conversation

@vinistock
Copy link
Member

@vinistock vinistock commented Mar 2, 2026

Another case we need promotion found in the wild. We need to be able to handle auto-promotion in this case:

Foo = dynamic
Foo::Bar = 123

Since Foo is already mark as promotable, we need to promote it to a namespace so that Foo::Bar can work as expected.

Note that we assume a module for now. This approach is not 100% correct, but we can't get much more precise without a type system first.

@vinistock vinistock self-assigned this Mar 2, 2026
@vinistock vinistock added the bugfix A change that fixes an existing bug label Mar 2, 2026 — with Graphite App
@vinistock vinistock marked this pull request as ready for review March 2, 2026 19:08
@vinistock vinistock requested a review from a team as a code owner March 2, 2026 19:08
@vinistock vinistock force-pushed the 03-02-fix_corner_cases_of_re-opening_aliases branch from 0d5c6f8 to 4f2c3c2 Compare March 2, 2026 19:12
@vinistock vinistock force-pushed the 03-02-auto_promote_when_creating_constants_inside_namespace branch 2 times, most recently from 5414794 to cc10553 Compare March 2, 2026 19:59
@vinistock vinistock force-pushed the 03-02-fix_corner_cases_of_re-opening_aliases branch 2 times, most recently from 9cf59ac to 5ea4e22 Compare March 4, 2026 14:49
@vinistock vinistock force-pushed the 03-02-auto_promote_when_creating_constants_inside_namespace branch from cc10553 to 14702a0 Compare March 4, 2026 14:49
@vinistock vinistock changed the base branch from 03-02-fix_corner_cases_of_re-opening_aliases to graphite-base/622 March 4, 2026 20:33
@vinistock vinistock force-pushed the 03-02-auto_promote_when_creating_constants_inside_namespace branch from 14702a0 to 775ee22 Compare March 4, 2026 20:44
@vinistock vinistock force-pushed the graphite-base/622 branch from 5ea4e22 to 6517163 Compare March 4, 2026 20:44
@graphite-app graphite-app bot changed the base branch from graphite-base/622 to main March 4, 2026 20:44
@vinistock vinistock force-pushed the 03-02-auto_promote_when_creating_constants_inside_namespace branch from 775ee22 to 517c495 Compare March 4, 2026 20:45
@vinistock vinistock merged commit 288d88d into main Mar 4, 2026
33 checks passed
Copy link
Member Author

Merge activity

@vinistock vinistock deleted the 03-02-auto_promote_when_creating_constants_inside_namespace branch March 4, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix A change that fixes an existing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants