Files
kotlin-fork/idea/testData/resolve/partialBodyResolve/WhileTrue.dump
T
Mikhail Glukhikh 8184bccda1 Extended loop data flow analysis was implemented. #KT-6283 Fixed. #KT-6284 Fixed.
A local descendant of JetTypeInfo added to save separately current data flow info and jump point data flow info together with jump opportunity.
Now data flow analysis know about loop bodies that must be executed at least once (do...while, while(true) until the first break/continue).
A set of tests for smart casts in and after loops.
Existing DoWhile and WhileTrue resolve tests corrected in accordance.
2015-04-14 19:11:22 +03:00

13 lines
280 B
Plaintext
Vendored

Resolve target: value-parameter val p: kotlin.Any? smart-cast to kotlin.Any
----------------------------------------------
fun x(): Boolean{}
fun foo(p: Any?) {
while(true) {
print(p!!)
/* STATEMENT DELETED: if (x()) break */
}
<caret>p.hashCode()
}