NJ2K: fix implicit type cast in binary expressions
#KT-37298 fixed
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
class A {
|
||||
void acceptDouble(double d) {}
|
||||
void acceptDoubleBoxed(Double d) {}
|
||||
|
||||
public void conversion() {
|
||||
int a = 10;
|
||||
float b = 0.7f;
|
||||
acceptDouble(a * b)
|
||||
acceptDoubleBoxed(a * b)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
internal class A {
|
||||
fun acceptDouble(d: Double) {}
|
||||
fun acceptDoubleBoxed(d: Double?) {}
|
||||
fun conversion() {
|
||||
val a = 10
|
||||
val b = 0.7f
|
||||
acceptDouble((a * b).toDouble())
|
||||
acceptDoubleBoxed((a * b).toDouble())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user