Open Linyxus opened 4 months ago
Minimised from the failing projects in https://github.com/scala/scala3/pull/19939#issuecomment-2051527673
Another case with overriden methods:
import language.experimental.captureChecking
trait Iterable[T] { self: Iterable[T]^ =>
def map[U](f: T => U): Iterable[U]^{this, f}
}
object Test {
def foo[T](level: Int, lines: Iterable[T]) =
lines.map(x => x)
class Bar:
def bar(messages: Iterable[String]) =
foo(1, messages)
class Baz extends Bar:
override def bar(messages: Iterable[String]) = ???
}
Compiler version
main
Minimized code
Output
Expectation
It should at least not crash.