Is there an equivalent to SuppressWarnings in Scala?

前端 未结 4 1099
感动是毒
感动是毒 2020-12-05 12:30

I was wondering if scala had an equivalent to java\'s @SuppressWarnings that can be applied to a function or whatever to ignore any deprecation warnings[1] that function emi

4条回答
  •  再見小時候
    2020-12-05 13:14

    No, and an enhancement request [1] for such a feature was closed as wontfix.

    I agree it would be useful. I expect that the Scala core team aren't against the idea, but they have finite resources and many higher priorities.

    update: this feature was eventually implemented in scala 2.13.2 release on 2020-04-22, see this answer

    [1] https://issues.scala-lang.org/browse/SI-1781

提交回复
热议问题