In 1.3, due to changes in language, testdata for some tests can be
different from 1.2
We want to simlultaneously test both versions, so instead of fixing
language version in such tests, we split them into two: one with fixed
1.2, another with fixed 1.3
Introdude deprecation as per KT-21515. Warning is reported on type
usage, that soon will became invisible. Quickfix by adding explicit
import is added.
Idea behind implementation is to mark scopes that are deprecated (see
ClassResolutionScopesSupport).
Then, during walk along hierarchy of scopes, look at deprecation status
of the scope that has provided this classifier.
Note that we also have to check if there are *some* non-deprecated
visibility paths (because we can see classifier by two paths, e.g. if
we've added explicit import) -- then this type reference shouldn't be
treated as deprecated.
1. Substitution variance (sv) is a substitution composition of type alias argument variance (av)
and corresponding expanding type argument variance (ev):
sv =
| av == ev -> av
| av == INVARIANT -> ev
| ev == INVARIANT -> av
| else -> (variance conflict error; av)
2. Resulting variance (rv) is a type argument composition of sv and type parameter variance (pv):
rv =
| sv == tv => INVARIANT
| sv == INVARIANT => INVARIANT
| tv == INVARIANT => sv
| else -> (variance conflict error; sv)
When resolving arguments on inner classifier, one can omit the arguments
for outer class 'Outer' if they are present implicitly in the scope:
- One of the supertypes of current class is Outer
- One of the outer classes or one of their supertypes is Outer
Relevant arguments are obtained from the first type found by
the algorithm above
Note that before this commit implicit arguments were only been searched
in containing classes
#KT-11123 Fixed