[NI] Disable capturing/approximation type in TypeSubstitutor with enabled NI
There is added a new service named `SubstitutingScopeProvider`, that provides factory that creates captured types and approximator for them. In OI they are the same as before commit, for NI they are empty, because that approximation interferes with NI algorithm That service is injected into function descriptors and property descriptors and used for creating `SubstitutingScope` with correct services Also there is changed time when we approximate captured types in NI (after all call checkers) #KT-25290 Fixed
This commit is contained in:
Vendored
+1
-1
@@ -7,5 +7,5 @@ interface Tr<T> {
|
||||
fun test(t: Tr<out String>) {
|
||||
// resolved as t.v = t.v + null!!, where type of right operand is String,
|
||||
// so TYPE_MISMATCH: String is not <: of Captured(out String)
|
||||
<!SETTER_PROJECTED_OUT!>t.v<!> += null!!
|
||||
<!NI;TYPE_MISMATCH!><!SETTER_PROJECTED_OUT!>t.v<!> += null!!<!>
|
||||
}
|
||||
Reference in New Issue
Block a user