Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Crystal::Macros::ProcNotation#resolve and #resolve? #11373

Merged

Conversation

HertzDevil
Copy link
Contributor

ProcNotations represent type names, so it makes sense that they should have the #resolve and #resolve? macro methods. In particular, they may appear in TypeDeclarations, so the following is now allowed:

macro foo(node)
  {{ node.type.resolve }}
end

foo(x : Int32 -> String) # => Proc(Int32, String)

@HertzDevil HertzDevil mentioned this pull request Oct 28, 2021
@straight-shoota straight-shoota added this to the 1.3.0 milestone Oct 28, 2021
@straight-shoota straight-shoota merged commit d7465d0 into crystal-lang:master Nov 2, 2021
@HertzDevil HertzDevil deleted the feature/procnotation-resolve branch November 3, 2021 06:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants