Created
August 4, 2015 20:47
-
-
Save arkadius/70c97f4ac2b0a338913f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A() | |
class B(val a: A) | |
class C(val b: B) | |
implicit def aToB(a: A) = new B(a) | |
implicit def sthConvertibleToBToC[T <% B](t: T): C = new C(t) | |
def doSthWithC[T <% C](t: T) = t.b | |
doSthWithC(new A) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment