[FIR] Disable data flow from in-place lambdas

There are many complications with the current design of passing data
from within in-place lambdas to surrounding code. Solving these
complications will involve more time to investigation than is available
within the K2 release. So we are disabling passing type statement
information from lambdas for the time being until more time can be
devoted to a more complete solution.

^KT-60958 Fixed
^KT-63530 Fixed
This commit is contained in:
Brian Norman
2023-12-11 10:25:48 -06:00
committed by Space Team
parent 645970fa7a
commit b2041e0927
68 changed files with 2834 additions and 2962 deletions
@@ -401,49 +401,48 @@ digraph implicitReceivers_kt {
color=blue
140 [label="Function call arguments enter"];
141 [label="Access variable this@R|special/anonymous|"];
142 [label="Smart cast: this@R|special/anonymous|"];
143 [label="Function call arguments exit"];
142 [label="Function call arguments exit"];
}
144 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow];
143 [label="Function call: this@R|special/anonymous|.<Unresolved name: foo>#()" style="filled" fillcolor=yellow];
subgraph cluster_51 {
color=blue
145 [label="Function call arguments enter"];
146 [label="Function call arguments exit"];
144 [label="Function call arguments enter"];
145 [label="Function call arguments exit"];
}
147 [label="Function call: this@R|special/anonymous|.R|/A.foo|()" style="filled" fillcolor=yellow];
148 [label="Exit block"];
146 [label="Function call: <Unresolved name: foo>#()" style="filled" fillcolor=yellow];
147 [label="Exit block"];
}
149 [label="Exit function <anonymous>" style="filled" fillcolor=red];
148 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
150 [label="Function call arguments exit"];
149 [label="Function call arguments exit"];
}
151 [label="Postponed exit from lambda"];
152 [label="Function call: R|kotlin/with|<R|kotlin/Any|, R|kotlin/Unit|>(...)" style="filled" fillcolor=yellow];
153 [label="Exit block"];
150 [label="Postponed exit from lambda"];
151 [label="Function call: R|kotlin/with<Inapplicable(INAPPLICABLE): kotlin/with>#|<R|kotlin/Any|, <ERROR TYPE REF: Cannot infer argument for type parameter R>>(...)" style="filled" fillcolor=yellow];
152 [label="Exit block"];
}
154 [label="Exit function <anonymous>" style="filled" fillcolor=red];
153 [label="Exit function <anonymous>" style="filled" fillcolor=red];
}
155 [label="Function call arguments exit"];
154 [label="Function call arguments exit"];
}
156 [label="Postponed exit from lambda"];
157 [label="Function call: R|kotlin/with|<R|kotlin/Any|, R|kotlin/Unit|>(...)" style="filled" fillcolor=yellow];
158 [label="Exit block"];
155 [label="Postponed exit from lambda"];
156 [label="Function call: R|kotlin/with<CS errors: kotlin/with>#|<R|kotlin/Any|, <ERROR TYPE REF: Cannot infer argument for type parameter R>>(...)" style="filled" fillcolor=yellow];
157 [label="Exit block"];
}
159 [label="Exit function test_3" style="filled" fillcolor=red];
158 [label="Exit function test_3" style="filled" fillcolor=red];
}
108 -> {109};
109 -> {110};
110 -> {111};
111 -> {112};
112 -> {113 155};
112 -> {156} [style=dotted];
112 -> {113 154};
112 -> {155} [style=dotted];
112 -> {113} [style=dashed];
113 -> {114};
114 -> {115};
115 -> {116};
116 -> {117};
117 -> {118 150};
117 -> {151} [style=dotted];
117 -> {118 149};
117 -> {150} [style=dotted];
117 -> {118} [style=dashed];
118 -> {119};
119 -> {120};
@@ -467,7 +466,7 @@ digraph implicitReceivers_kt {
135 -> {136};
136 -> {138};
137 -> {139};
138 -> {139};
138 -> {139} [label="Postponed"];
139 -> {140};
140 -> {141};
141 -> {142};
@@ -477,195 +476,195 @@ digraph implicitReceivers_kt {
145 -> {146};
146 -> {147};
147 -> {148};
148 -> {149};
148 -> {150};
149 -> {151};
150 -> {152};
151 -> {152} [color=green];
151 -> {157} [color=red];
150 -> {151} [color=green];
150 -> {156} [color=red label="Postponed"];
151 -> {152};
152 -> {153};
153 -> {154};
153 -> {155};
154 -> {156};
155 -> {157};
155 -> {156} [label="Postponed"];
156 -> {157};
157 -> {158};
158 -> {159};
subgraph cluster_52 {
color=red
160 [label="Enter function test_4" style="filled" fillcolor=red];
159 [label="Enter function test_4" style="filled" fillcolor=red];
subgraph cluster_53 {
color=blue
161 [label="Enter block"];
160 [label="Enter block"];
subgraph cluster_54 {
color=blue
162 [label="Enter when"];
161 [label="Enter when"];
subgraph cluster_55 {
color=blue
163 [label="Enter when branch condition "];
164 [label="Access variable this@R|/test_4|"];
165 [label="Type operator: (this@R|/test_4| !is R|A|)"];
166 [label="Exit when branch condition"];
162 [label="Enter when branch condition "];
163 [label="Access variable this@R|/test_4|"];
164 [label="Type operator: (this@R|/test_4| !is R|A|)"];
165 [label="Exit when branch condition"];
}
subgraph cluster_56 {
color=blue
167 [label="Enter when branch condition "];
168 [label="Access variable this@R|/test_4|"];
169 [label="Smart cast: this@R|/test_4|"];
170 [label="Type operator: (this@R|/test_4| !is R|B|)"];
171 [label="Exit when branch condition"];
166 [label="Enter when branch condition "];
167 [label="Access variable this@R|/test_4|"];
168 [label="Smart cast: this@R|/test_4|"];
169 [label="Type operator: (this@R|/test_4| !is R|B|)"];
170 [label="Exit when branch condition"];
}
subgraph cluster_57 {
color=blue
172 [label="Enter when branch condition else"];
173 [label="Exit when branch condition"];
171 [label="Enter when branch condition else"];
172 [label="Exit when branch condition"];
}
174 [label="Enter when branch result"];
173 [label="Enter when branch result"];
subgraph cluster_58 {
color=blue
175 [label="Enter block"];
174 [label="Enter block"];
subgraph cluster_59 {
color=blue
176 [label="Function call arguments enter"];
177 [label="Access variable this@R|/test_4|"];
178 [label="Smart cast: this@R|/test_4|"];
179 [label="Function call arguments exit"];
175 [label="Function call arguments enter"];
176 [label="Access variable this@R|/test_4|"];
177 [label="Smart cast: this@R|/test_4|"];
178 [label="Function call arguments exit"];
}
180 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow];
179 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow];
subgraph cluster_60 {
color=blue
181 [label="Function call arguments enter"];
182 [label="Function call arguments exit"];
180 [label="Function call arguments enter"];
181 [label="Function call arguments exit"];
}
183 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow];
182 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow];
subgraph cluster_61 {
color=blue
184 [label="Function call arguments enter"];
185 [label="Access variable this@R|/test_4|"];
186 [label="Smart cast: this@R|/test_4|"];
187 [label="Function call arguments exit"];
183 [label="Function call arguments enter"];
184 [label="Access variable this@R|/test_4|"];
185 [label="Smart cast: this@R|/test_4|"];
186 [label="Function call arguments exit"];
}
188 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow];
187 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow];
subgraph cluster_62 {
color=blue
189 [label="Function call arguments enter"];
190 [label="Function call arguments exit"];
188 [label="Function call arguments enter"];
189 [label="Function call arguments exit"];
}
191 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow];
192 [label="Exit block"];
190 [label="Function call: this@R|/test_4|.R|/B.bar|()" style="filled" fillcolor=yellow];
191 [label="Exit block"];
}
193 [label="Exit when branch result"];
194 [label="Enter when branch result"];
192 [label="Exit when branch result"];
193 [label="Enter when branch result"];
subgraph cluster_63 {
color=blue
195 [label="Enter block"];
194 [label="Enter block"];
subgraph cluster_64 {
color=blue
196 [label="Function call arguments enter"];
197 [label="Access variable this@R|/test_4|"];
198 [label="Smart cast: this@R|/test_4|"];
199 [label="Function call arguments exit"];
195 [label="Function call arguments enter"];
196 [label="Access variable this@R|/test_4|"];
197 [label="Smart cast: this@R|/test_4|"];
198 [label="Function call arguments exit"];
}
200 [label="Function call: this@R|/test_4|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
199 [label="Function call: this@R|/test_4|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
subgraph cluster_65 {
color=blue
201 [label="Function call arguments enter"];
202 [label="Function call arguments exit"];
200 [label="Function call arguments enter"];
201 [label="Function call arguments exit"];
}
203 [label="Function call: <Unresolved name: bar>#()" style="filled" fillcolor=yellow];
202 [label="Function call: <Unresolved name: bar>#()" style="filled" fillcolor=yellow];
subgraph cluster_66 {
color=blue
204 [label="Function call arguments enter"];
205 [label="Access variable this@R|/test_4|"];
206 [label="Smart cast: this@R|/test_4|"];
207 [label="Function call arguments exit"];
203 [label="Function call arguments enter"];
204 [label="Access variable this@R|/test_4|"];
205 [label="Smart cast: this@R|/test_4|"];
206 [label="Function call arguments exit"];
}
208 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow];
207 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow];
subgraph cluster_67 {
color=blue
209 [label="Function call arguments enter"];
210 [label="Function call arguments exit"];
208 [label="Function call arguments enter"];
209 [label="Function call arguments exit"];
}
211 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow];
212 [label="Exit block"];
210 [label="Function call: this@R|/test_4|.R|/A.foo|()" style="filled" fillcolor=yellow];
211 [label="Exit block"];
}
213 [label="Exit when branch result"];
214 [label="Enter when branch result"];
212 [label="Exit when branch result"];
213 [label="Enter when branch result"];
subgraph cluster_68 {
color=blue
215 [label="Enter block"];
214 [label="Enter block"];
subgraph cluster_69 {
color=blue
216 [label="Function call arguments enter"];
217 [label="Access variable this@R|/test_4|"];
218 [label="Function call arguments exit"];
215 [label="Function call arguments enter"];
216 [label="Access variable this@R|/test_4|"];
217 [label="Function call arguments exit"];
}
219 [label="Function call: this@R|/test_4|.<Unresolved name: foo>#()" style="filled" fillcolor=yellow];
218 [label="Function call: this@R|/test_4|.<Unresolved name: foo>#()" style="filled" fillcolor=yellow];
subgraph cluster_70 {
color=blue
220 [label="Function call arguments enter"];
221 [label="Function call arguments exit"];
219 [label="Function call arguments enter"];
220 [label="Function call arguments exit"];
}
222 [label="Function call: <Unresolved name: foo>#()" style="filled" fillcolor=yellow];
221 [label="Function call: <Unresolved name: foo>#()" style="filled" fillcolor=yellow];
subgraph cluster_71 {
color=blue
223 [label="Function call arguments enter"];
224 [label="Access variable this@R|/test_4|"];
225 [label="Function call arguments exit"];
222 [label="Function call arguments enter"];
223 [label="Access variable this@R|/test_4|"];
224 [label="Function call arguments exit"];
}
226 [label="Function call: this@R|/test_4|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
225 [label="Function call: this@R|/test_4|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
subgraph cluster_72 {
color=blue
227 [label="Function call arguments enter"];
228 [label="Function call arguments exit"];
226 [label="Function call arguments enter"];
227 [label="Function call arguments exit"];
}
229 [label="Function call: <Unresolved name: bar>#()" style="filled" fillcolor=yellow];
230 [label="Exit block"];
228 [label="Function call: <Unresolved name: bar>#()" style="filled" fillcolor=yellow];
229 [label="Exit block"];
}
231 [label="Exit when branch result"];
232 [label="Exit when"];
230 [label="Exit when branch result"];
231 [label="Exit when"];
}
subgraph cluster_73 {
color=blue
233 [label="Function call arguments enter"];
234 [label="Access variable this@R|/test_4|"];
235 [label="Function call arguments exit"];
232 [label="Function call arguments enter"];
233 [label="Access variable this@R|/test_4|"];
234 [label="Function call arguments exit"];
}
236 [label="Function call: this@R|/test_4|.<Unresolved name: foo>#()" style="filled" fillcolor=yellow];
235 [label="Function call: this@R|/test_4|.<Unresolved name: foo>#()" style="filled" fillcolor=yellow];
subgraph cluster_74 {
color=blue
237 [label="Function call arguments enter"];
238 [label="Function call arguments exit"];
236 [label="Function call arguments enter"];
237 [label="Function call arguments exit"];
}
239 [label="Function call: <Unresolved name: foo>#()" style="filled" fillcolor=yellow];
238 [label="Function call: <Unresolved name: foo>#()" style="filled" fillcolor=yellow];
subgraph cluster_75 {
color=blue
240 [label="Function call arguments enter"];
241 [label="Access variable this@R|/test_4|"];
242 [label="Function call arguments exit"];
239 [label="Function call arguments enter"];
240 [label="Access variable this@R|/test_4|"];
241 [label="Function call arguments exit"];
}
243 [label="Function call: this@R|/test_4|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
242 [label="Function call: this@R|/test_4|.<Unresolved name: bar>#()" style="filled" fillcolor=yellow];
subgraph cluster_76 {
color=blue
244 [label="Function call arguments enter"];
245 [label="Function call arguments exit"];
243 [label="Function call arguments enter"];
244 [label="Function call arguments exit"];
}
246 [label="Function call: <Unresolved name: bar>#()" style="filled" fillcolor=yellow];
247 [label="Exit block"];
245 [label="Function call: <Unresolved name: bar>#()" style="filled" fillcolor=yellow];
246 [label="Exit block"];
}
248 [label="Exit function test_4" style="filled" fillcolor=red];
247 [label="Exit function test_4" style="filled" fillcolor=red];
}
159 -> {160};
160 -> {161};
161 -> {162};
162 -> {163};
163 -> {164};
164 -> {165};
165 -> {166};
166 -> {167 214};
165 -> {166 213};
166 -> {167};
167 -> {168};
168 -> {169};
169 -> {170};
170 -> {171};
171 -> {172 194};
170 -> {171 193};
171 -> {172};
172 -> {173};
173 -> {174};
174 -> {175};
@@ -686,8 +685,8 @@ digraph implicitReceivers_kt {
189 -> {190};
190 -> {191};
191 -> {192};
192 -> {193};
193 -> {232};
192 -> {231};
193 -> {194};
194 -> {195};
195 -> {196};
196 -> {197};
@@ -706,8 +705,8 @@ digraph implicitReceivers_kt {
209 -> {210};
210 -> {211};
211 -> {212};
212 -> {213};
213 -> {232};
212 -> {231};
213 -> {214};
214 -> {215};
215 -> {216};
216 -> {217};
@@ -741,63 +740,62 @@ digraph implicitReceivers_kt {
244 -> {245};
245 -> {246};
246 -> {247};
247 -> {248};
subgraph cluster_77 {
color=red
249 [label="Enter function test_5" style="filled" fillcolor=red];
248 [label="Enter function test_5" style="filled" fillcolor=red];
subgraph cluster_78 {
color=blue
250 [label="Enter block"];
249 [label="Enter block"];
subgraph cluster_79 {
color=blue
251 [label="Enter when"];
250 [label="Enter when"];
subgraph cluster_80 {
color=blue
252 [label="Enter when branch condition "];
253 [label="Access variable this@R|/test_5|"];
254 [label="Type operator: (this@R|/test_5| is R|kotlin/collections/List<*>|)"];
255 [label="Exit when branch condition"];
251 [label="Enter when branch condition "];
252 [label="Access variable this@R|/test_5|"];
253 [label="Type operator: (this@R|/test_5| is R|kotlin/collections/List<*>|)"];
254 [label="Exit when branch condition"];
}
subgraph cluster_81 {
color=blue
256 [label="Enter when branch condition "];
257 [label="Access variable this@R|/test_5|"];
258 [label="Type operator: (this@R|/test_5| is R|kotlin/String|)"];
259 [label="Exit when branch condition"];
255 [label="Enter when branch condition "];
256 [label="Access variable this@R|/test_5|"];
257 [label="Type operator: (this@R|/test_5| is R|kotlin/String|)"];
258 [label="Exit when branch condition"];
}
subgraph cluster_82 {
color=blue
260 [label="Enter when branch condition else"];
261 [label="Exit when branch condition"];
259 [label="Enter when branch condition else"];
260 [label="Exit when branch condition"];
}
262 [label="Enter when branch result"];
261 [label="Enter when branch result"];
subgraph cluster_83 {
color=blue
263 [label="Enter block"];
264 [label="Const: Int(0)"];
265 [label="Exit block"];
262 [label="Enter block"];
263 [label="Const: Int(0)"];
264 [label="Exit block"];
}
266 [label="Exit when branch result"];
267 [label="Enter when branch result"];
265 [label="Exit when branch result"];
266 [label="Enter when branch result"];
subgraph cluster_84 {
color=blue
268 [label="Enter block"];
269 [label="Access variable R|kotlin/String.length|"];
270 [label="Exit block"];
267 [label="Enter block"];
268 [label="Access variable R|kotlin/String.length|"];
269 [label="Exit block"];
}
271 [label="Exit when branch result"];
272 [label="Enter when branch result"];
270 [label="Exit when branch result"];
271 [label="Enter when branch result"];
subgraph cluster_85 {
color=blue
273 [label="Enter block"];
274 [label="Access variable R|SubstitutionOverride<kotlin/collections/List.size: R|kotlin/Int|>|"];
275 [label="Exit block"];
272 [label="Enter block"];
273 [label="Access variable R|SubstitutionOverride<kotlin/collections/List.size: R|kotlin/Int|>|"];
274 [label="Exit block"];
}
276 [label="Exit when branch result"];
277 [label="Exit when"];
275 [label="Exit when branch result"];
276 [label="Exit when"];
}
278 [label="Jump: ^test_5 when () {
277 [label="Jump: ^test_5 when () {
(this@R|/test_5| is R|kotlin/collections/List<*>|) -> {
this@R|/test_5|.R|SubstitutionOverride<kotlin/collections/List.size: R|kotlin/Int|>|
}
@@ -809,62 +807,63 @@ digraph implicitReceivers_kt {
}
}
"];
279 [label="Stub" style="filled" fillcolor=gray];
280 [label="Exit block" style="filled" fillcolor=gray];
278 [label="Stub" style="filled" fillcolor=gray];
279 [label="Exit block" style="filled" fillcolor=gray];
}
281 [label="Exit function test_5" style="filled" fillcolor=red];
280 [label="Exit function test_5" style="filled" fillcolor=red];
}
248 -> {249};
249 -> {250};
250 -> {251};
251 -> {252};
252 -> {253};
253 -> {254};
254 -> {255};
255 -> {256 272};
254 -> {255 271};
255 -> {256};
256 -> {257};
257 -> {258};
258 -> {259};
259 -> {260 267};
258 -> {259 266};
259 -> {260};
260 -> {261};
261 -> {262};
262 -> {263};
263 -> {264};
264 -> {265};
265 -> {266};
266 -> {277};
265 -> {276};
266 -> {267};
267 -> {268};
268 -> {269};
269 -> {270};
270 -> {271};
271 -> {277};
270 -> {276};
271 -> {272};
272 -> {273};
273 -> {274};
274 -> {275};
275 -> {276};
276 -> {277};
277 -> {278};
278 -> {281};
277 -> {280};
277 -> {278} [style=dotted];
278 -> {279} [style=dotted];
279 -> {280} [style=dotted];
280 -> {281} [style=dotted];
subgraph cluster_86 {
color=red
282 [label="Enter function test_6" style="filled" fillcolor=red];
281 [label="Enter function test_6" style="filled" fillcolor=red];
subgraph cluster_87 {
color=blue
283 [label="Enter block"];
284 [label="Access variable this@R|/test_6|"];
285 [label="Type operator: (this@R|/test_6| as R|kotlin/collections/List<*>|)"];
286 [label="Access variable R|SubstitutionOverride<kotlin/collections/List.size: R|kotlin/Int|>|"];
287 [label="Access variable this@R|/test_6|"];
288 [label="Smart cast: this@R|/test_6|"];
289 [label="Type operator: (this@R|/test_6| as R|kotlin/String|)"];
290 [label="Access variable R|kotlin/String.length|"];
291 [label="Exit block"];
282 [label="Enter block"];
283 [label="Access variable this@R|/test_6|"];
284 [label="Type operator: (this@R|/test_6| as R|kotlin/collections/List<*>|)"];
285 [label="Access variable R|SubstitutionOverride<kotlin/collections/List.size: R|kotlin/Int|>|"];
286 [label="Access variable this@R|/test_6|"];
287 [label="Smart cast: this@R|/test_6|"];
288 [label="Type operator: (this@R|/test_6| as R|kotlin/String|)"];
289 [label="Access variable R|kotlin/String.length|"];
290 [label="Exit block"];
}
292 [label="Exit function test_6" style="filled" fillcolor=red];
291 [label="Exit function test_6" style="filled" fillcolor=red];
}
281 -> {282};
282 -> {283};
283 -> {284};
284 -> {285};
@@ -874,6 +873,5 @@ digraph implicitReceivers_kt {
288 -> {289};
289 -> {290};
290 -> {291};
291 -> {292};
}