Skip to content

Reading constant names from constant nodes #2434

Answered by kddnewton
exterm asked this question in Q&A
Discussion options

You must be logged in to vote

These two sentences seem contradictory. It'd be great to have full_name on ConstantWriteNode too so that we can call full_name on any kind of Constant* node.

@exterm yeah as mentioned, I'd be happy to support full_name on ConstantWriteNode. Do you want to open a PR for that?

it would be really nice to have some inheritance between node types.

I would be amenable to marker interfaces, which should work with Sorbet. That's been discussed a bit here: #2092 and I think this is something we're going to implement sometime this year.

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@exterm
Comment options

@exterm
Comment options

@kddnewton
Comment options

Answer selected by exterm
@exterm
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants