Skip to content

Commit 6bbe0c0

Browse files
committed
mention raw-type runtime check in case of unsafe higher-kinded cast
1 parent 25b1105 commit 6bbe0c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/scala/com/tegonal/scala/commons/anyExtensions.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ private def emitWarningIfUnableToTypeCheckEntirely[T](using Type[T], Quotes) = {
9393
s"unsafe cast, cannot type check against an abstract type member (${Type.show[T]}) due to type erasure (can only check against an upper bound if defined)"
9494
)
9595
} else if (sym.isClassDef && repr.typeArgs.nonEmpty) {
96-
report.warning(s"unsafe cast, cannot type check against a higher-kinded type (${Type.show[T]}) due to type erasure")
96+
report.warning(
97+
s"unsafe cast, cannot type check against a higher-kinded type (${Type.show[T]}) due to type erasure (can only check against the raw type)"
98+
)
9799
}
98100
}

0 commit comments

Comments
 (0)