Dotty Documentation


object VarianceChecker
extends Object

Provides check method to check that all top-level definitions in tree are variance correct. Does not recurse inside methods. The method should be invoked once for each Template.

[-] Constructors

[-] Members

[+] case class VarianceError
[+] object VarianceError
[+] def check ( tree: Tree ) ( implicit ctx: Context ) : Unit
[+] def checkLambda ( tree: LambdaTypeTree ) ( implicit ctx: Context ) : Unit

Check that variances of type lambda correspond to their occurrences in its body. Note: this is achieved by a mechanism separate from checking class type parameters. Question: Can the two mechanisms be combined in one?