Report a warning when comparing incompatible enums
I've put `isIncompatibleEnums` to TypeIntersector because I placed all of its usages after all of the TypeIntersector::isIntersectionEmpty ones ^KT-28225 Fixed
This commit is contained in:
@@ -11,6 +11,6 @@ public enum JavaEnumB {}
|
||||
enum class KotlinEnumA
|
||||
enum class KotlinEnumB
|
||||
|
||||
fun jj(a: JavaEnumA, b: JavaEnumB) = a == b
|
||||
fun jk(a: JavaEnumA, b: KotlinEnumB) = a == b
|
||||
fun kk(a: KotlinEnumA, b: KotlinEnumB) = a == b
|
||||
fun jj(a: JavaEnumA, b: JavaEnumB) = <!INCOMPATIBLE_ENUM_COMPARISON!>a == b<!>
|
||||
fun jk(a: JavaEnumA, b: KotlinEnumB) = <!INCOMPATIBLE_ENUM_COMPARISON!>a == b<!>
|
||||
fun kk(a: KotlinEnumA, b: KotlinEnumB) = <!INCOMPATIBLE_ENUM_COMPARISON!>a == b<!>
|
||||
|
||||
Reference in New Issue
Block a user