Skip to content

Syntax refactoring #7657

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

Closed
wants to merge 9 commits into from
Closed

Syntax refactoring #7657

wants to merge 9 commits into from

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Dec 2, 2019

  • Break out optional with from TemplateBody production
  • Disallow new with { ...}.
  • Allow with when implementing multiple types in a given instance
  • Disallow old extension method syntax given { ... }. and given ops: { ... }

 - Break out optional `with` from TemplateBody production
 - Disallow `new with { ...}`.
We don't actually solve this one. `given` still applies to all parameters
in a clause.
Don't allow extension methods to have type parameters if collective
type parameters were already given. The reason to disallow is that
we don't support multiple consecutive type argument sections yet.
And merging two type parameter sections into one would break a future
extension where we do allow multiple consecutive type argument sections.
So far we allowed `given A, B with ... `
but not `given A with B with ... `
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.

1 participant