Open noresttherein opened 3 years ago
Is the problem reproducible in Scala 2.13.6?
Yes, sorry.
@noresttherein how confident are you this is minimized?
fwiw, it does compile in Scala 3
Scala 2:
java.lang.StackOverflowError
at scala.reflect.internal.Types$TypeRef.mapOver(Types.scala:2371)
at scala.reflect.internal.Types$Type$$anon$1.apply(Types.scala:806)
at scala.reflect.internal.Types$Type$$anon$1.apply(Types.scala:805)
at scala.reflect.internal.Types$TypeRef.mapOver(Types.scala:2380)
...
reproduction steps
using Scala ~2.13.4~2.13.6,
problem
If you comment out trait
Test
, everything seems ok. That is, except random pieces of code usingF
in completly legal ways you get aStackOverflowException
. InTest
, the problem is them(x)
call in presence of overloads of the same shape(?). In the original, the types weren't even generic, but unrelated. ShouldF
compile at all? If not, is the whole problem approached by this code unsolvable in general?