Dotty Documentation

0.11.0-bin-SNAPSHOT

trait NoChecking
extends Object with ReChecking

[-] Constructors

[-] Members

[+] override def checkCaseInheritance ( parentSym: Symbol , caseCls: ClassSymbol , pos: Position ) ( implicit ctx: Context ) : Unit

Check that case classes are not inherited by case classes.

[+] override def checkClassType ( tp: Type , pos: Position , traitReq: Boolean , stablePrefixReq: Boolean ) ( implicit ctx: Context ) : Type

Check that tp is a class type. Also, if traitReq is true, check that tp is a trait. Also, if stablePrefixReq is true and phase is not after RefChecks, check that class prefix is stable.

[+] override def checkDerivedValueClass ( clazz: Symbol , stats: List [ Tree ] ) ( implicit ctx: Context ) : Unit

Verify classes extending AnyVal meet the requirements

[+] override def checkFeasibleParent ( tp: Type , pos: Position , where: => String ) ( implicit ctx: Context ) : Type

Check that tp is a class type and that any top-level type arguments in this type are feasible, i.e. that their lower bound conforms to their upper bound. If a type argument is infeasible, issue and error and continue with upper bound.

[+] def checkFeasibleParent$default$3 : String

Check that tp is a class type and that any top-level type arguments in this type are feasible, i.e. that their lower bound conforms to their upper bound. If a type argument is infeasible, issue and error and continue with upper bound.

[+] override def checkFeature ( base: ClassSymbol , name: TermName , description: => String , featureUseSite: Symbol , pos: Position ) ( implicit ctx: Context ) : Unit

Issue a feature warning if feature is not enabled

[+] override def checkImplicitConversionDefOK ( sym: Symbol ) ( implicit ctx: Context ) : Unit

If sym is an implicit conversion, check that implicit conversions are enabled.

[+] override def checkImplicitConversionUseOK ( sym: Symbol , pos: Position ) ( implicit ctx: Context ) : Unit

If sym is an implicit conversion, check that that implicit conversions are enabled, unless - it is synthetic - it is has the same owner as one of the classes it converts to (modulo companions) - it is defined in Predef - it is the scala.reflect.Selectable.reflectiveSelectable conversion

[+] override def checkInInlineContext ( what: String , pos: Position ) ( implicit ctx: Context ) : Unit

Check that we are in an inline context (inside an inline method or in inline code)

[+] override def checkInlineConformant ( tree: Tree , isFinal: Boolean , what: => String ) ( implicit ctx: Context ) : Unit

Check that tree can be right hand-side or argument to inline value or parameter.

[+] override def checkMembersOK ( tp: Type , pos: Position ) ( implicit ctx: Context ) : Type

Check that all named types that form part of this type have a denotation. Called on inferred (result) types of ValDefs and DefDefs. This could fail for types where the member was originally available as part of the self type, yet is no longer visible once the this has been replaced by some other prefix. See neg/i3083.scala

[+] override def checkNoDoubleDeclaration ( cls: Symbol ) ( implicit ctx: Context ) : Unit

Check that class does not declare same symbol twice

[+] override def checkNoForwardDependencies ( vparams: List [ ValDef ] ) ( implicit ctx: Context ) : Unit

Check that method parameter types do not reference their own parameter or later parameters in the same parameter section.

[+] override def checkNonCyclic ( sym: Symbol , info: TypeBounds , reportErrors: Boolean ) ( implicit ctx: Context ) : Type
[+] override def checkNonCyclicInherited ( joint: Type , parents: List [ Type ] , decls: Scope , pos: Position ) ( implicit ctx: Context ) : Unit
[+] override def checkNotSingleton ( tpt: Tree , where: String ) ( implicit ctx: Context ) : Tree

Check that tpt does not refer to a singleton type

[+] override def checkParentCall ( call: Tree , caller: ClassSymbol ) ( implicit ctx: Context ) : Unit
[+] override def checkSimpleKinded ( tpt: Tree ) ( implicit ctx: Context ) : Tree

Check that tpt does not define a higher-kinded type

[+] override def checkStable ( tp: Type , pos: Position ) ( implicit ctx: Context ) : Unit

Check that type tp is stable.

[+] override def checkTraitInheritance ( parentSym: Symbol , cls: ClassSymbol , pos: Position ) ( implicit ctx: Context ) : Unit

Given a parent parent of a class cls, if parent is a trait check that the superclass of cls derived from the superclass of parent.

An exception is made if cls extends Any, and parent is java.io.Serializable or java.lang.Comparable. These two classes are treated by Scala as universal traits. E.g. the following is OK:

... extends Any with java.io.Serializable

The standard library relies on this idiom.

[+] override def checkValue ( tree: Tree , proto: Type ) ( implicit ctx: Context ) : tree.type

Check that Java statics and packages can only be used in selections.