Compiler version 3.0.0-RC1 ## Minimized code ```Scala type Return[X] = X match case List[t] => List[t] case Any => List[X] object Return: def apply[A](a:A):Return[A] = a match case a: List[t] => a case a: Any => List(a) object Test: Return(1).map(x => x) ``` ## Output ```scala WARNING: method map in class IterableOnceExtensionMethods is deprecated since 2.13.0: Use .iterator.map instead or consider requiring an Iterable ``` ## Expectation This should work. the same way as ```scala List(1).map(x => x) ```