It seems possible, but I'm not being able to. People make many questions about that usage on class constructor, but I'm unable to use it even on a simple function.
I have a class called DependecyChecker
, which is using scalax Graph library. Inside my class, I create a graph and store it in a value, called DAG
. Then, there is a method which returns a specific node of the graph. On this method, I specified the return type as this.DAG.NodeT
, and it works well.
What I'm trying to do, then, is to pass the return of such a method to another function, outside the class. I'm a bit confused. What I've tried:
def func(arg: DependencyChecker#Graph#NodeT){
arg
}
def func(arg: DependencyChecker#DAG#NodeT){
arg
}
def fund[A](arg: A#Graph#NodeT){
arg
}
def fund[A <: DependencyChecker](arg: A#Graph#NodeT){
arg
}
None of the above works. I'm kinda running out of ideas, and this seems very simple, yet I cannot find how to do it, nor learn it by myself. How do I do that?
PS. The type Graph is the type of the DAG value, but that type is not store inside my class. It is imported.