Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object foo {
- class A
- object A {
- implicit def blah(a: A) = 0
- }
- class B {
- def foo(implicit foo: List[B]) = null
- }
- object B {
- implicit val blah = List(new B) // type B must be a part of type of blah
- }
- def main(args: Array[String]) {
- val i: Int = new A()
- val b = new B
- b.foo
- }
- }
Add Comment
Please, Sign In to add comment