You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Starting Scala 3.1 (AFAIK) the compiler produces a warning (and under some settings an error) whenever extending a class that is not declared as open. Having studied https://docs.scala-lang.org/scala3/reference/other-new-features/open-classes.html, it seems to me that spec super classes are clear use case for open classes. Is there any reason why they are not declared open?
The warning message for the record, and for Google:
[warn] -- Feature Warning: [...] .scala:8:25
[warn] 8 | org.scalatest.freespec.AnyFreeSpec,
[warn] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[warn] |Unless class AnyFreeSpec is declared 'open', its extension in a separate file should be enabled
[warn] |by adding the import clause 'import scala.language.adhocExtensions'
[warn] |or by setting the compiler option -language:adhocExtensions.
[warn] |See the Scala docs for value scala.language.adhocExtensions for a discussion
[warn] |why the feature should be explicitly enabled.
[warn] one warning found
The text was updated successfully, but these errors were encountered:
Starting Scala 3.1 (AFAIK) the compiler produces a warning (and under some settings an error) whenever extending a class that is not declared as
open
. Having studied https://docs.scala-lang.org/scala3/reference/other-new-features/open-classes.html, it seems to me that spec super classes are clear use case for open classes. Is there any reason why they are not declared open?The warning message for the record, and for Google:
The text was updated successfully, but these errors were encountered: