-
Notifications
You must be signed in to change notification settings - Fork 697
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Tests
testAdjustQueryHaving
, testQueryAndHaving
, and `testQu…
…eryOrHaving` resolve wrong `eq` function, and `testGroupBy03` shows compiler warning (#2016) The tests `testAdjustQueryHaving`, `testQueryAndHaving`, and `testQueryOrHaving` falsely resolve this `eq` function infix fun <T : Comparable<T>, V : T?, E : EntityID<T>?> Expression<in V>.eq( other: ExpressionWithColumnType<E> ): Op<Boolean> = other eq this instead of this infix fun <T, S1 : T?, S2 : T?> Expression<in S1>.eq(other: Expression<in S2>): Op<Boolean> = when (other as Expression<*>) { is Op.NULL -> isNull() else -> EqOp(this, other) } The same happens when using `neq`, `less`, `lessEq`, `greater`, and `greaterEq`, so those are fixed in this commit too. Even when the correct function is resolved, a compiler warning still shows up because the compiler cannot infer the type of the argument when `Long` and `Int` are being compared. To remove the warning, the types are explicitly passed to the `eq` function like this `.eq<Number, Long, Int>`. This was tested with Kotlin 2.0.0-Beta4.
- Loading branch information
Showing
3 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters