Java to Kotlin converter: fixed crash in converter + more correct auto insertion of !!

#KT-851 Fixed
This commit is contained in:
Valentin Kipyatkov
2014-06-24 21:09:29 +04:00
parent d3b773c0cd
commit 30a7c67aaa
7 changed files with 29 additions and 6 deletions
@@ -6,6 +6,6 @@ class Test() {
}
fun test() {
val i = getInteger(10)!!
val i = getInteger(10)
}
}
@@ -0,0 +1,9 @@
//file
class Test {
void putInt(int i) {}
void test() {
Byte b = 10;
putInt(b);
}
}
+9
View File
@@ -0,0 +1,9 @@
class Test() {
fun putInt(i: Int) {
}
fun test() {
val b = 10
putInt(b.toInt())
}
}
@@ -2,6 +2,6 @@ import kotlinApi.*
class C() {
fun foo() {
val v = globalGenericFunction<Int>(1)!!
val v = globalGenericFunction<Int>(1)
}
}
@@ -1,4 +1,4 @@
fun foo(i: Int) {
var i1 = i!!
var i1 = i
i1++
}