Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix method resolution ambiguity when passing null to eq/neq methods #1450

Merged

Conversation

naftalmm
Copy link
Contributor

@naftalmm naftalmm commented Feb 7, 2022

This PR fixes #1437 by making fun <T : Comparable<T>, E : EntityID<T>?> ExpressionWithColumnType<E>.eq(t: T?) overload accept only non-nullable arguments. Passing null to receivers of this type will be resolved to more general overload <T> ExpressionWithColumnType<T>.eq(t: T) having the same logic for processing of this value.
Also, this PR fixes the same problem for neq method and unifies their API and implementation.

…f columns optionally referencing to the `id` of another table;

unify logic of these methods;
add respectful test cases
@Tapac Tapac merged commit c284396 into JetBrains:master Feb 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to use nullable reference with lookup
2 participants