Commit Graph

5 Commits

Author SHA1 Message Date
Andrey Breslav
fecf6f9fdf Star projection information preserved in substitutions
#KT-6700 Fixed
2015-02-02 19:52:01 +03:00
Svetlana Isakova
37abdc2ca6 Rewritten captured type approximation test
Approximation bounds may be non-trivial both (in this case we ignore 'in' projection);
no need for special interpretation of 'Nothing?'
2014-12-27 00:55:28 +03:00
Svetlana Isakova
c097e6ee3e After approximation interpret Contr<*> as Contr<Nothing>
not Contr<out Any?>
2014-12-12 23:08:29 +03:00
Svetlana Isakova
a3e949674f Preserve nullability while substituting captured types 2014-12-12 23:08:28 +03:00
Svetlana Isakova
cd359a046c Added captured types and approximation
CapturedType captures type projection while solving the constraint system.
During the substitution type containing captured types is approximated
to get rid of captured types and (for simple cases) replace them with corresponding type projections.

Note that Array<Array< CapturedType(out Int) >> is (over)approximated by Array<out<Array<out Int>>

See 'Mixed-site variance' by Ross Tate for details.

 #KT-2570 Fixed
 #KT-2872 Fixed
 #KT-3213 Fixed
2014-12-12 23:08:27 +03:00