标签: scala deprecated
我希望Scala编译器在发现使用特定函数时显示弃用警告。我怎样才能做到这一点?
答案 0 :(得分:33)
我没有注意到评论,kristian-domagala,所以这里是例子:
@deprecated("Reason this is old","01-08-2014") def oldMethod = { ... }
答案 1 :(得分:29)
将其注释为@deprecated。
@deprecated