Created
May 16, 2018 09:54
-
-
Save ignasi35/5d9f9b78656f8842dacc3c539f9de123 to your computer and use it in GitHub Desktop.
Thin cake deprecation alternatives
This file contains hidden or 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
trait ACompo { | |
@deprecated("foo", "1.1") | |
def foo: String | |
} | |
trait BCompo { | |
def foo: String | |
} | |
trait CCompo { | |
// @deprecated("foo", "1.1") | |
// def foo: String | |
} | |
// This is the only alternative that fails compilation or raises a warning of any kind. | |
class W extends CCompo { | |
override lazy val foo: String = "123" | |
} | |
class X extends ACompo with BCompo with CCompo { | |
override lazy val foo: String = "123" | |
} | |
class Y extends BCompo with ACompo { | |
override lazy val foo: String = "123" | |
} | |
// This doesn't raise a warning or compilation error despite ACompo#foo being depreacted | |
class Z extends ACompo { | |
override lazy val foo: String = "123" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment