Skip to content

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

Merged
straight-shoota merged 3 commits intocrystal-lang:masterfrom
HertzDevil:feature/procnotation-resolve
Nov 2, 2021
Merged

Add Crystal::Macros::ProcNotation#resolve and #resolve?#11373
straight-shoota merged 3 commits intocrystal-lang:masterfrom
HertzDevil:feature/procnotation-resolve

Conversation

@HertzDevil
Copy link
Copy Markdown
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