Closed
Description
The provided code doesn't compile when there is a -Yexplicit-nulls
flag.
With explicit nulls, we can't compile code like stringValue == null
, which is mentioned in the subsection "Equality" that just after the "Unsoundness" subsection.
I think this piece of code can be corrected and simplified as
class C {
val f: String = foo(f)
def foo(f2: String): String = f2
val c = new C()
// c.f is null