[FIR]: allow char comparison in Fir2Ir
This commit is contained in:
committed by
Mikhail Glukhikh
parent
d407663734
commit
7eaac0bf2a
@@ -1245,6 +1245,7 @@ class Fir2IrVisitor(
|
||||
ClassId(FqName("kotlin"), FqName("Int"), false) -> irBuiltIns.intType
|
||||
ClassId(FqName("kotlin"), FqName("Float"), false) -> irBuiltIns.floatType
|
||||
ClassId(FqName("kotlin"), FqName("Double"), false) -> irBuiltIns.doubleType
|
||||
ClassId(FqName("kotlin"), FqName("Char"), false) -> irBuiltIns.charType
|
||||
else -> {
|
||||
return IrErrorCallExpressionImpl(
|
||||
startOffset, endOffset, booleanType, "Comparison of arguments with unsupported type: $classId"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
fun <T> id(x: T) = x
|
||||
|
||||
fun box(): String {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
fun box(): String {
|
||||
val a: Char? = 'a'
|
||||
val result = a!! < 'b'
|
||||
|
||||
Reference in New Issue
Block a user