Skip to content

Commit 027d078

Browse files
committed
Remove inline from parameters used in path-dependent types.
`inline` parameters can be evaluated several times, and therefore are not stable paths, so they cannot be used in path-dependent types. Checking this was fixed in Scala 3.3.0. See scala/scala3#15511
1 parent 5243d8c commit 027d078

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dotty/derivation/src/main/scala/perspective/derivation/inlineHkdGeneric.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,7 +828,7 @@ trait InlineHKDProductGeneric[A] extends InlineHKDGeneric[A]:
828828
* Like [[productElementId]], but gives back the exact type. Can only be
829829
* used in unrolled calls.
830830
*/
831-
transparent inline def productElementIdExact(inline idx: Index): idx.X
831+
transparent inline def productElementIdExact(idx: Index): idx.X
832832

833833
/**
834834
* Like an inline match, but delays the expansion slightly. The value inside
@@ -930,7 +930,7 @@ object InlineHKDProductGeneric:
930930
override inline def productElementId(index: Index): index.X =
931931
a.asInstanceOf[Product].productElement(index).asInstanceOf[index.X]
932932

933-
override transparent inline def productElementIdExact(inline idx: Index): idx.X =
933+
override transparent inline def productElementIdExact(idx: Index): idx.X =
934934
InlineHKDGeneric.productElementIdExact[A, ElemTop](a, idx)
935935

936936
override inline def summonInstances[F[_]]: Gen[F] =

0 commit comments

Comments
 (0)