Skip to content

Commit

Permalink
airframe-surface: Handle case fields as method arguments in Scala 3 (#…
Browse files Browse the repository at this point in the history
…2051)

wvlet.airframe.surface.MultipleConstructorArgsTest
wvlet.airframe.surface.ClassSurfaceTest
  • Loading branch information
exoego committed Feb 3, 2022
1 parent a9b5c92 commit 9363558
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -330,7 +330,9 @@ private[surface] class CompileTimeSurfaceFactory[Q <: Quotes](using quotes: Q) {
td.name -> classTypeParams(i)
}.toMap[String, TypeRepr]
// println(s"type args: ${typeArgTable}")
methodArgs.map(_.tree).collect { case v: ValDef =>
// tpeArgs for case fields, methodArgs for method arguments
// E.g. case class Foo(a: String)(implicit b: Int)
(tpeArgs ++ methodArgs).map(_.tree).collect { case v: ValDef =>
// Substitue type param to actual types
val resolved: TypeRepr = v.tpt.tpe match {
case a: AppliedType =>
Expand Down

0 comments on commit 9363558

Please sign in to comment.