Fix replacedBaseClause for selector which has implicit receiver

#KT-19666 Fixed
This commit is contained in:
scache
2017-08-27 14:15:55 +09:00
committed by Dmitry Jemerov
parent a9a52379ee
commit e5b290d77f
4 changed files with 36 additions and 2 deletions
@@ -0,0 +1,13 @@
// WITH_RUNTIME
interface Taggable {
val tag: String
}
fun Any.log() {
val tag = <caret>if (this is Taggable) {
tag
}
else {
this::class.java.simpleName
}
}
@@ -0,0 +1,8 @@
// WITH_RUNTIME
interface Taggable {
val tag: String
}
fun Any.log() {
val tag = (this as? Taggable)?.tag ?: this::class.java.simpleName
}