-
Notifications
You must be signed in to change notification settings - Fork 21
Description
Hi,
I think this defaultParamsInference is a great example I'd like to extend further to include the type of each case class field.
What amazes me is I didn't realize you can cast a Tree as you do here:
https://github.com/lampepfl/dotty-macro-examples/blob/main/defaultParamsInference/src/macro.scala#L18
I thought I would need to use the Symbol's signature to get the type but I don't see a lot of documentation for signature or how to access type information (such as individually selecting types from higher orders, such as List[Int], as enabled in scala 2 by typeSignature or scala.reflect.macros.Context.typeCheck).
So can someone please clarify how tree or signature can be used to get detailed type information for each case class field?
Thanks!