Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arguments and parameters are not systematically captured #22

Open
matanox opened this issue Feb 5, 2016 · 0 comments
Open

Arguments and parameters are not systematically captured #22

matanox opened this issue Feb 5, 2016 · 0 comments

Comments

@matanox
Copy link
Member

matanox commented Feb 5, 2016

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant