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

Constructing an ELM interval with null boundaries does not work correctly #543

Open
ewoutkramer opened this issue Sep 16, 2024 · 0 comments

Comments

@ewoutkramer
Copy link
Member

Multiple tests construct an interval with a Null as boundaries, for which the type is supposed to be Interval<Any,Any>.

Our ExpressionBuilder does not handle this case well: interval construction is translated to a call to operators.Interval, but we don't have any overloads in operators that take an Any as a parameter, and the overload resolution, having nothing to go on, just picks the first overload, which happens to be Interval<CqlDate> . So, all Interval[null,null] calls turn into an Interval<CqlDate>, not Interval<Any>, which then causes typing errors.

I have introduced a fix specifically for the case where we construct an Interval where both boundaries are ELM Nulls, to return the correct typed null interval instance, but we should probably deal with this more generically, e.g. for Lists and other "generic" types.

For now, you can find the fix (and a reference to this issue) in TranslateElement, in a specific case for Interval.

@ewoutkramer ewoutkramer added the bug Something isn't working label Sep 16, 2024
@baseTwo baseTwo removed the bug Something isn't working label Oct 18, 2024
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

No branches or pull requests

2 participants