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

--functions does not account for trait methods dependencies #1571

Open
mario-bucev opened this issue Aug 30, 2024 · 1 comment
Open

--functions does not account for trait methods dependencies #1571

mario-bucev opened this issue Aug 30, 2024 · 1 comment

Comments

@mario-bucev
Copy link
Collaborator

If we pass --functions=useCalc we get a well-formedness error because compute was not overriden by Iden.

object DashDashFunctions {
  trait Calculator {
    def compute(x: BigInt): BigInt
  }
  case class Iden() extends Calculator {
    override def compute(x: BigInt): BigInt = x + x - x
  }


  def useCalc(c: Calculator): BigInt = {
    val x = c.compute(1)
    x
  }
}

It seems that the dependencies computation does not pull the children implementation.

@mario-bucev
Copy link
Collaborator Author

Maybe there is something to add in the dependency graph override

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