Looking at the Akka docs for creating an Actor:
The recommended approach to create the actor Props is not supported for cases when the actor constructor takes value classes as arguments.
Is it possible to define a function:
def anyTypeButValueClass[A : ...](x: A) = ???
where A
is any type except for a value class at compile-time?
My understanding is that value classes extend AnyVal
,(per docs) but there's also:
The standard implementation includes nine AnyVal subtypes:
Double, Float, Long, Int, Char, Short, and Byte
are the numeric value types.
Unit and Boolean
are the non-numeric value types.
per AnyVal.
How can this function be written?