-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Revised given syntax #21208
Revised given syntax #21208
Conversation
A good way to judge the merits or problems of the change to optional names is to look at the diff of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes should be reverted
tests/neg/i13580.scala
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This a new neg
test, it should have it's own .check
file
51fb223
to
2e0047a
Compare
Update given syntax to latest discussed variant in the SIP tests/pos/given-syntax.scala shows a semi-systematic list of possible syntax forms.
2e0047a
to
62c71c0
Compare
GivenImpl ::= GivenType ([‘=’ Expr] | TemplateBody) | ||
| ConstrApps TemplateBody | ||
GivenConditional ::= DefTypeParamClause | ||
| DefTermParamClause |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this really DefTermParamClause
, or can it be FunParamClause
instead? as far as i can tell, the difference is in modifiers (inline, erased) and default value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It s a DefTypeParamClause. Modifiers and default values are allowed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do we resolve ambiguity between DefTermParamClause
and '(' FunArgTypes ')'
, especially since a simple type can look like a parameter?
You mean, if the given actually implements a function? In that case the function has to come in parentheses. |
Update given syntax to latest discussed variant in the SIP
tests/pos/given-syntax.scala shows a semi-systematic list of possible syntax forms.