cedric
10/21/2016, 6:22 PMjrenner
10/21/2016, 6:22 PMcedric
10/21/2016, 6:23 PMjrenner
10/21/2016, 6:23 PMdalexander
10/21/2016, 6:24 PMnoahd
10/21/2016, 6:35 PMnhaarman
10/21/2016, 7:40 PMWARNING
, ERROR
and HIDDEN
deprecation levels? For example, what is the difference between just removing a method and marking it as ERROR
or HIDDEN
?jw
10/21/2016, 7:41 PMnhaarman
10/21/2016, 7:45 PMcy
10/21/2016, 7:54 PMERROR
you can provide particular error message and replacement expression. With HIDDEN
you can't use the declaration but it is existing in the bytecode so already existing compiled code will work so it is useful for binary compatibilitynhaarman
10/21/2016, 7:55 PMcy
10/21/2016, 8:01 PMScreenshot_20161021_225943.png▾
kevinmost
10/21/2016, 8:02 PMjw
10/21/2016, 8:02 PMjw
10/21/2016, 8:02 PMkevinmost
10/21/2016, 8:03 PMReplaceWith("TODO(\"Remove me\")")
? 🙂jw
10/21/2016, 8:04 PMreplaceWith = RECOMMEND_DELETE
or somethingcy
10/21/2016, 8:05 PMkevinmost
10/21/2016, 8:06 PMcy
10/21/2016, 8:06 PMcy
10/21/2016, 8:06 PMcy
10/21/2016, 8:11 PMcy
10/21/2016, 8:12 PM@Deprecated("Use new API instead", ReplaceWith("someNewAPI(name, size)"), DeprecationLevel.ERROR)
fun someOldAPI(size: Int, name: String): String = TODO("something complicated")
fun someNewAPI(name: String, size: Int): String = TODO("new implementation")
fun someUsage() {
someOldAPI(1 + 1, "") // -> someNewAPI("", 1 + 1)
}
kevinmost
10/21/2016, 8:37 PMpakoito
10/21/2016, 9:28 PMminikloon
10/22/2016, 5:46 AMminikloon
10/22/2016, 5:47 AMminikloon
10/22/2016, 5:48 AMminikloon
10/22/2016, 5:52 AMminikloon
10/22/2016, 5:53 AM