-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[SR-1009] Add methods to an Array containing a specific type #43621
Comments
The syntax for this would be
except we haven't implemented that yet. @DougGregor, do you remember where we are with that? |
Actually, the version with |
We've been doing some of the infrastructural work that would enable this feature, but nobody is actively working on the implementation of this feature (which we refer to as "concrete same-type requirements" on https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160229/011666.html) |
Comment by Matthew Mario Di Pasquale (JIRA) Cool! : |
@belkadan@DougGregor Does this look like a reasonable fit for Swift 3? Has that infrastructure worked progressed to a point where somebody could pick up implementing this feature? |
Unfortunately there's still a fair bit of work remaining before we can tackle this, I'm afraid. SILFunction::ContextGenericParams probably has to go away and be replaced with an ArrayRef<Substitution>. |
An update: we're getting closer. SILFunction::ContextGenericParams is gone, and so is the canonical mangling signature stuff. Next step is to remove the archetype from AbstractTypeParamDecl; I'm working on that now. |
Here it is: #5126 |
Merged. |
Additional Detail from JIRA
md5: b6b1e530310ef2059d8fb2110e717e5f
is duplicated by:
Issue Description:
For example, if I'd like to activate the constraints inside of
constraints: [NSLayoutConstraint]
, instead of writingNSLayoutConstraint.activateConstraints(constraints)
, I'd like to writeconstraints.activate()
. However, the compiler should only allow callingactivate()
on an array if the contained type implementsactivate()
. Note: Apple's documentation says: "Typically, using [the activateConstraints()] method is more efficient than activating each constraint individually." So,constraints.activate()
would be faster than constraints.map { $0.active = true }.The text was updated successfully, but these errors were encountered: