-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Context Bounds for Polymorphic Functions #21643
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
Changes from 17 commits
a76470f
8dc68c3
3ac5cec
408aa74
134c015
309034e
64bd03e
5196efd
5f0d4a7
a736592
0af8397
9c66069
ec6d7ef
dfa9240
7755e3b
24e3fa0
f292ac5
f9db9fa
952eff7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3429,7 +3429,7 @@ object Parsers { | |
* | ||
* TypTypeParamClause::= ‘[’ TypTypeParam {‘,’ TypTypeParam} ‘]’ | ||
* TypTypeParam ::= {Annotation} | ||
* (id | ‘_’) [HkTypeParamClause] TypeBounds | ||
* (id | ‘_’) [HkTypeParamClause] TypeAndCtxBounds | ||
* | ||
* HkTypeParamClause ::= ‘[’ HkTypeParam {‘,’ HkTypeParam} ‘]’ | ||
* HkTypeParam ::= {Annotation} [‘+’ | ‘-’] | ||
|
@@ -3460,7 +3460,9 @@ object Parsers { | |
else ident().toTypeName | ||
val hkparams = typeParamClauseOpt(ParamOwner.Hk) | ||
val bounds = | ||
if paramOwner.acceptsCtxBounds then typeAndCtxBounds(name) else typeBounds() | ||
if paramOwner.acceptsCtxBounds then typeAndCtxBounds(name) | ||
else if in.featureEnabled(Feature.modularity) && paramOwner == ParamOwner.Type then typeAndCtxBounds(name) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why does this need the modularity import? isn't it part of SIP-64 so should be enabled without a feature? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmmm, I assumed that, since it was meant to be pushed to the next minor, it should be under a language import. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we should fix that in the followup and backport to RC2. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
else typeBounds() | ||
TypeDef(name, lambdaAbstract(hkparams, bounds)).withMods(mods) | ||
} | ||
} | ||
|
Uh oh!
There was an error while loading. Please reload this page.