hi lads, trying but fail to understand why this co...
# compiler
v
hi lads, trying but fail to understand why this code is successfully getting compiled on kotlin 1.6.0, but fails to do that on 1.7.0 onwards. thx
Copy code
fun test(root: Root<T>,
             builder: CriteriaBuilder,
             elementClass: Class<*>) {
        toObjectPredicate(root, builder, elementClass as Class<Enum<*>>)
    }
Copy code
private fun <Y : Comparable<Y>> toObjectPredicate(
        root: Root<T>,
        builder: CriteriaBuilder,
        elementClass: Class<Y>
    ): Predicate? {
        val key: Path<Y> = root.get(filter.field)

        @Suppress("UNCHECKED_CAST")
        return null
    }
as a note, the Enum class signature hasnt been changed in between
Copy code
public abstract class Enum<E : Enum<E>>(name: String, ordinal: Int): Comparable<E>