Hmm, just discovered that smart cast doesn’t work ...
# announcements
g
Hmm, just discovered that smart cast doesn’t work for `obj::class.java`: http://try.kotlinlang.org/#/UserProjects/35drpmirdvt073pkk3s5nfsn8v/7v6kraquqm6trj9rjs0gj8erts Maybe anybody knows the reason of that
🤔 1
👍 1
k
gildor: make sure to create an issue. looks like a bad bug
m
Simpler example:
Copy code
val obj: String? = ""
        if (obj != null) {
            obj.length
            obj::class.java
        }
g
@mg6maciej Thanks! I’ll use your example for issue