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 known issue with Any, Any resolution #435

Open
brynrhodes opened this issue Jun 21, 2019 · 3 comments
Open

Fix known issue with Any, Any resolution #435

brynrhodes opened this issue Jun 21, 2019 · 3 comments
Assignees
Milestone

Comments

@brynrhodes
Copy link
Member

The following expressions:

define Test1: null ~ null
define Test2: null = null

result in an error about ambiguous resolution. This is because the generic resolution that would have enabled these is disabled (see #420) because once a binary operator signature for Any, Any is instantiated, it ends up being used for all resolutions, even if a more appropriate specific resolution is available. The operator resolution needs to take this possibility into account so that this functionality can be reintroduced.

@brynrhodes brynrhodes added the bug label Jun 21, 2019
@brynrhodes brynrhodes added this to the 1.4 Maintenance milestone Jun 21, 2019
@cmoesel
Copy link
Member

cmoesel commented Jun 21, 2019

This is only relevant when both sides are literal null, right? In other words, while this might come up in test cases, you should never see production CQL that does a comparison between two literal nulls -- so it's really only a problem for tests cases like the one above, right?

@brynrhodes
Copy link
Member Author

Yes, it's an edge case for sure, but there are also places where it will manifest if you only have a compile-time type of Any, where an =(Any, Any) should be allowed but the translator can't resolve it.

@JPercival
Copy link
Contributor

Should retest this with the latest operator resolution code. Might be resolved as it recently got smarter.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants