Partial body resolve: added a test to fail if smart-casts will become too clever

This commit is contained in:
Valentin Kipyatkov
2014-11-18 17:30:08 +03:00
parent e7ba59b209
commit ca8d45259b
4 changed files with 21 additions and 2 deletions
@@ -0,0 +1,12 @@
// this test will fail if control flow analysis will start to produce smart-casts after "while(2 * 2 == 4)"
fun x(): Boolean{}
fun foo(p: Any?) {
while(2 * 2 == 4) {
print(p!!)
if (x()) break
}
<caret>p.hashCode()
}