Introduce intention 'expr.unsafeCast<Type>()' <- -> 'expr as Type'
So #KT-16382 Fixed
This commit is contained in:
committed by
Mikhail Glukhikh
parent
085c7d30ed
commit
e35ec8ee08
@@ -0,0 +1 @@
|
||||
org.jetbrains.kotlin.idea.intentions.ConvertUnsafeCastCallToUnsafeCastIntention
|
||||
@@ -0,0 +1,4 @@
|
||||
// JS
|
||||
fun test(foo: dynamic) {
|
||||
val s = <caret>foo.unsafeCast<String>()
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// JS
|
||||
fun test(foo: dynamic) {
|
||||
val s = <caret>foo as String
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// JS
|
||||
// IS_APPLICABLE: false
|
||||
fun test(foo: Any?) {
|
||||
val s = <caret>foo?.unsafeCast<String>()
|
||||
}
|
||||
Reference in New Issue
Block a user