Skip to content

Conversation

@thomasmarshall
Copy link

We previously fixed something similar here, but apparently that wasn't enough. For example:

module ::
end

Prism parses the ConstantPathNode as not having a name. The code will crash when the unresolved constant name is core::Names::empty(). This Pr fixes that by using core::Names::Constants::ConstantNameMissing() instead (which is arguably more appropriate anyway).

The desugar tree is different to the original parser, which throws away more of the tree. The easier fix for the Prism parse tree is to insert this ConstantNameMissing constant and retain the rest of the tree.

@amomchilov amomchilov force-pushed the desugar-remaining branch 2 times, most recently from d96acf3 to 7f35d5d Compare December 19, 2025 19:25
The behavior is different from the original parser which just throws
the module away.
@thomasmarshall thomasmarshall force-pushed the handle-constant-paths-missing-names branch from 08a0d3c to 5264546 Compare January 7, 2026 12:35
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.

1 participant