crystal
crystal copied to clipboard
Macro lookup on `.class` fails with 'undefined method' when generic args are passed explicitly
trafficstars
Bug Report
# or class or struct
module M(T)
macro foo
{% p @type %}
end
end
M.foo
# => M(T), expected
alias Mx = M(Int32)
Mx.foo
# => M(Int32), expected
M(Int32).foo
# => fails, undefined method 'foo' for M(Int32).class.
# Expected: M(Int32)
Crystal 1.16.3