J2K: Insert initializer type for properties with primitive type if necessary
This commit is contained in:
+1
-1
@@ -5,7 +5,7 @@ internal class Test {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val b = 10
|
||||
val b: Byte = 10
|
||||
putInt(b.toInt())
|
||||
|
||||
val b2 = 10
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ internal class Test {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
val b = 10
|
||||
val b: Byte = 10
|
||||
putInt(b.toInt())
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -3,7 +3,7 @@ package demo
|
||||
internal class Test(i: Int) {
|
||||
|
||||
fun test() {
|
||||
val b = 10
|
||||
val b: Byte = 10
|
||||
Test(b.toInt())
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
internal class Test {
|
||||
val int: Int
|
||||
get() {
|
||||
val b = 10
|
||||
val b: Byte = 10
|
||||
return b.toInt()
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
class A {
|
||||
public void foo() {
|
||||
int i = 1;
|
||||
byte b = 1;
|
||||
short s = 1;
|
||||
long l = 1;
|
||||
double d = 1.0;
|
||||
float f = 1.0f;
|
||||
char c = 1;
|
||||
}
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
internal class A {
|
||||
fun foo() {
|
||||
val i = 1
|
||||
val b: Byte = 1
|
||||
val s: Short = 1
|
||||
val l: Long = 1
|
||||
val d = 1.0
|
||||
val f = 1.0f
|
||||
val c: Char = 1.toChar()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user