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

Do not require label for singleton group key #32

Open
julianhyde opened this issue Apr 22, 2020 · 0 comments
Open

Do not require label for singleton group key #32

julianhyde opened this issue Apr 22, 2020 · 0 comments

Comments

@julianhyde
Copy link
Collaborator

Currently we require that each group key (expression following a group keyword in a from expression) either has an explicit label (defined using id =) or is such that an implicit label can be derived.

But if the group has only one expression and is the last step in a from then no label is needed, therefore we should not require a label.

The following expression currently throws IllegalArgumentException: cannot derive label for expression x + y but should be valid:

from p in [(1, 2), (3, 4)] group x + y

The following expression is invalid, and should remain invalid, because group not the last step (it is followed by where):

from p in [(1, 2), (3, 4)] group x + y where false
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

1 participant