Symbol()
over deprecated symbol literal syntax SC-W1080Symbol literals or symbolic literals are those that are declared using only an open quote such as 'Scala
. This allows such strings to be interned. However, this syntax can get quite confusing and is recommended that you use Symbol.apply()
instead. If you intend to migrate to Scala 3, it is recommended that you perform this refactoring across your codebase to avoid compilation warnings and errors later on.
val intern = 'Scala
val intern = Symbol("Scala")