KT-19390: Fix char + String in Java is converted to code with multiple type errors in Kotlin (#1235)

#KT-19390 Fixed
This commit is contained in:
Toshiaki Kameyama
2017-11-13 20:13:34 +09:00
committed by Simon Ogorodnik
parent 1e940bde01
commit 2be27d5380
8 changed files with 96 additions and 21 deletions
@@ -0,0 +1,8 @@
public class CharToNumber {
private byte b = 'c';
private short s = 'c';
private int i = 'c';
private long l = 'c';
private float f = 'c';
private double d = 'c';
}
@@ -0,0 +1,8 @@
class CharToNumber {
private val b: Byte = 'c'.toByte()
private val s: Short = 'c'.toShort()
private val i: Int = 'c'.toInt()
private val l: Long = 'c'.toLong()
private val f = 'c'.toFloat()
private val d = 'c'.toDouble()
}
@@ -0,0 +1,7 @@
public class CharToString {
private String value;
public String test() {
return '"' + value + '"';
}
}
@@ -0,0 +1,7 @@
class CharToString {
private val value: String? = null
fun test(): String {
return '"'.toString() + value + '"'.toString()
}
}