Implement quick fix for converting primitive types

#KT-10476 Fixed
This commit is contained in:
Kirill Rakhman
2016-03-11 00:30:18 +01:00
committed by Dmitry Jemerov
parent b328f37495
commit 48310d66da
8 changed files with 107 additions and 0 deletions
@@ -0,0 +1,7 @@
// "Convert expression to 'Float'" "true"
fun foo() {
bar(1 + 3L<caret>)
}
fun bar(l: Float) {
}
@@ -0,0 +1,7 @@
// "Convert expression to 'Float'" "true"
fun foo() {
bar((1 + 3L).toFloat()<caret>)
}
fun bar(l: Float) {
}
@@ -0,0 +1,7 @@
// "Convert expression to 'Int'" "true"
fun foo() {
bar(1L<caret>)
}
fun bar(l: Int) {
}
@@ -0,0 +1,7 @@
// "Convert expression to 'Int'" "true"
fun foo() {
bar(1L.toInt()<caret>)
}
fun bar(l: Int) {
}