RefChecks

object RefChecks
Companion:
class
class Object
trait Matchable
class Any

Type members

Classlikes

class LevelInfo(outerLevelAndIndex: LevelAndIndex, stats: List[Tree])(using x$3: Context) extends OptLevelInfo

A class to help in forward reference checking

A class to help in forward reference checking

class OverridingPairsChecker(clazz: ClassSymbol, self: Type)(using x$3: Context) extends Cursor

A class for checking all overriding pairs of class with a given check function

A class for checking all overriding pairs of class with a given check function

Value members

Concrete methods

Check that we do not "override" anything with a private method or something that becomes a private method. According to the Scala modeling this is non-sensical since private members don't override. But Java and the JVM disagree, if the private member is a method. A test case is neg/i7926b.scala. Note: The compiler could possibly silently rename the offending private instead of flagging it as an error. But that might mean we see some surprising names at runtime. E.g. in neg/i4564a.scala, a private case class apply method would have to be renamed to something else.

Check that we do not "override" anything with a private method or something that becomes a private method. According to the Scala modeling this is non-sensical since private members don't override. But Java and the JVM disagree, if the private member is a method. A test case is neg/i7926b.scala. Note: The compiler could possibly silently rename the offending private instead of flagging it as an error. But that might mean we see some surprising names at runtime. E.g. in neg/i4564a.scala, a private case class apply method would have to be renamed to something else.

Check that unary method definition do not receive parameters. They can only receive inferred parameters such as type parameters and implicit parameters.

Check that unary method definition do not receive parameters. They can only receive inferred parameters such as type parameters and implicit parameters.

Concrete fields