Is there an equivalent to SuppressWarnings in Scala?

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 emits?

1: Relevant warning in my case is: method stop in class Thread is deprecated: see corresponding Javadoc for more information. I am aware of the problems with stop however there are still some cases where due to legacy code we have to use it.

52
задан Aaron Novstrup 30 October 2010 в 13:53
поделиться

1 ответ

Нет, и запрос на улучшение [1] для такой возможности был закрыт как wontfix.

Я согласен, что это было бы полезно. Я ожидаю, что основная команда Scala не против этой идеи, но у них ограниченные ресурсы и много более приоритетных задач.

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

26
ответ дан 7 November 2019 в 09:35
поделиться
Другие вопросы по тегам:

Похожие вопросы: