You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Caffeine cache builder requires that the key and value types of the cache extend Object. In Scala this is analogous to AnyRef. To make scalacache compatible, I've added a type constraint on the key (K <: AnyRef). The strange thing is that this only seems to be necessary on Scala 2.12 and not on 2.13 or 3.
The text was updated successfully, but these errors were encountered:
I think this probably has to do with this issue fixed in scala-2.13. As for a solution here, I think the only option is to wrap the key type when its a value type in order for it to compile in scala-2.12. This can be done either at the point of use (like the change by @lewisjkl in the tests), or alternatively if we don't want the user to need to deal with it we can maybe try to find a way for the wrapping to be done automatically for value types (I guess that might be possible using macros maybe?)
The Caffeine cache builder requires that the key and value types of the cache extend
Object
. In Scala this is analogous toAnyRef
. To make scalacache compatible, I've added a type constraint on the key (K <: AnyRef
). The strange thing is that this only seems to be necessary on Scala 2.12 and not on 2.13 or 3.The text was updated successfully, but these errors were encountered: