Skip to content

Arguments and parameters are not systematically captured #22

Description

@matanox

Run the plugin over:

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?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions