Fix KCallable#name intrinsic for bound references

Do not skip generation of the left-hand side because it may produce side
effects

 #KT-12995 Fixed
This commit is contained in:
Alexander Udalov
2016-07-14 18:28:46 +03:00
parent 0ea885ce58
commit 91e486d020
4 changed files with 34 additions and 5 deletions
@@ -0,0 +1,10 @@
// See KT-12995
fun box(): String {
var state = 0
val name = (state++)::toString.name
if (name != "toString") return "Fail 1: $name"
if (state != 1) return "Fail 2: $state"
return "OK"
}