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
class IsDeadCode {
trait A {/* has a `def toString: String` inherited from scala.AnyRef */}
class B extends A { override def toString = "B"}
class C extends A { override def toString = "C" /* is this dead code? */ }
def main(a: Array[String]): Unit = {
def foo(a: A) = a.toString // does it call .toString on all the A’s?
val b: B = new B;
val c: C = new C;
foo ( b )
}
}
It is not being captured that:
b is passed as an argument to foo
a is a symbol used in the program
Do we want to capture that information? (do we want to visualize that information?). We still capture the method call toString as is, so might this be seen as just an additional layer of information, which is not in and of itself necessary for what we try to visualize, and answer, for a user?
The text was updated successfully, but these errors were encountered:
Run the plugin over:
It is not being captured that:
b
is passed as an argument tofoo
a
is a symbol used in the programDo we want to capture that information? (do we want to visualize that information?). We still capture the method call
toString
as is, so might this be seen as just an additional layer of information, which is not in and of itself necessary for what we try to visualize, and answer, for a user?The text was updated successfully, but these errors were encountered: