An anonymous function can be defined by `{case ...}` without a prior `match`. The expected type must be `Functionk[...]` for k > 0 or `PartialFunction[...]` where the argument types must be fully determined but the result type may be undetermined. (SLS 8.5)
Import selectors work in the same way for type and term members. For instance, an import clause `import p.{x => y}` renames the term name `p.x` to the term name `y` and the type name `p.x` to the type name `y`. (SLS 4.7)
A sealed class may not be directly inherited, except [...] in the same source file [...]. However, subclasses of a sealed class can be inherited anywhere (SLS 5.2.7)
For invocations of signature polymorphic methods [...], the invoked method has a different method type at each call site. [...]
On [JDK 11+] signature polymorphic methods are [...] members of java.lang.invoke.MethodHandle or VarHandle. (SLS 6.6.2)
A class member definition m that overrides some other function mโฒ in a base class of C may leave out the return type, even if it is recursive. (SLS 4.6.5)
A method named `copy` is implicitly added to every case class unless the class already has a member (directly defined or inherited) with that name, or the class has a repeated parameter. (SLS 5.3.2)
The compiler supplies imports in a preamble to every source file. This preamble conceptually has the following form, where braces indicate nested scopes:
import java.lang._ {
import scala._ {
import Predef._ {
/* source */
}}}
(SLS 2)