如何解决宏中的泛型?

How to resolve Generics in macros?

macro m(type)
  {% puts type.resolve %}
end

module Foo
  class Bar
  end

  class Baz
    m(Array(Bar))
  end
end

# in temp4.cr:10: undefined macro method 'Generic#resolve'
# 
#     m(Array(Bar))

我需要解析 Array(Bar) 以便它打印带有完整路径的类型 (Array(Foo::Bar))。有没有一种方便的方法不考虑类型复杂性(例如Array(Bar, Array(SomeOtherType) | Int32))?

通过此 PR 解决:https://github.com/crystal-lang/crystal/pull/6617。谢谢阿里!