Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- trait CProvider {
- def c = ???
- }
- trait Script {
- this:CProvider =>
- lazy val a = c
- }
- //try to provide `a` as singleton by creating object
- object Script extends Script
- //want other code to be able to do this
- println(Script.a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement