Scala - Multiple inheritance with App trait
|Added at||2017-01-04 19:01|
Consider two traits, TestTrait1 and TestTrait and assume NewObject extends both. The idea is to make use of variable in TestTrait1 in TestTrait. The below code works perfectly fine.
Now replace TestTrait1 with App. Since arguments is set for lazy evaluation, I will assume that even in case of DelayedInit, the below code will work.
But it doesn't. What is the reason behind this?
If this is the case, what is the solution to use args in another trait similar to TestTrait here?