Skip to content

Commit b6fceee

Browse files
Fix Scala 3 compile error in GenIso after IsoFields return type change
PR #1574 changed IsoFields.apply to return PIso[S, S, ? <: Tuple, ? <: Tuple] but GenIso._fields still fed the result into `whitebox`, which expects Expr[Iso[S, A]]. The wildcard type no longer unifies with Iso[S, A], breaking macrosJVM compilation on every Scala 3 JVM job (the CI page only showed temurin@25 red because fail-fast cancelled the others). Cast the IsoFields result directly to Expr[Iso[S, Any]] in the fallback branch, matching the erased cast `whitebox` already performs. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 065f774 commit b6fceee

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎macro/src/main/scala-3/monocle/macros/GenIso.scala‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ object GenIso {
7474
whitebox(_apply[S, a](e))
7575

7676
case _ =>
77-
whitebox('{ monocle.internal.IsoFields[S](using $e) })
77+
'{ monocle.internal.IsoFields[S](using $e) }.asInstanceOf[Expr[Iso[S, Any]]]
7878
}
7979
}
8080
}

0 commit comments

Comments
 (0)