Constructors
Members
For PolyTypes, type parameters are skipped because they are defined explicitly (their TypeDefs will be passed here.) For MethodTypes, the same is true of the parameters (ValDefs).
Check variance of abstract type tvar
when referred from base
.
Is no variance checking needed within definition of base
?
The next level to take into account when determining the relative variance with a method parameter as base. The method is always skipped. If the method is a constructor, we also skip its class owner, because constructors are not checked for variance relative to the type parameters of their own class. On the other hand constructors do count for checking the variance of type parameters of enclosing classes. I believe the Scala 2 rules are too lenient in that respect.
The variance of a symbol occurrence of tvar
seen at the level of the definition of base
.
The search proceeds from base
to the owner of tvar
.
Initially the state is covariant, but it might change along the search.
The variance of a symbol occurrence of tvar
seen at the level of the definition of base
.
The search proceeds from base
to the owner of tvar
.
Initially the state is covariant, but it might change along the search.