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-7209] Source compatibility regression: error: ambiguous reference to member 'min(by:)' #49757
Comments
This is https://bugs.swift.org/browse/SR-2450 except a source compatibility regression and confusing: The fix is to make the code more explicit about which Oh, and it looks like you've defined separate |
They're not going for |
That, or we lost a |
@swift-ci create |
Thanks for the quick attention! @belkadan is right, we do want the ones from Sequence. Looks like I have a mistake or two in the 2nd example (missing This is reproducible in the REPL, so it should be independent of any other code in our project:
Compared to 4.1:
Assuming I'm reading |
Adding conditions to the extension to match those on the extension that adds extension Range where Bound: Strideable, Bound.Stride: SignedInteger {
var highest: Bound? { return self.max() }
} However, I was unable to figure out a more clean way to add an extension to |
I believe this was fixed by #15450 . (Sorry for being misleading in my comment!) |
Environment
swift-DEVELOPMENT-SNAPSHOT-2018-03-14-a, macOS
Additional Detail from JIRA
md5: cacf8d20ac6c8b7e50ebf49a8fea1284
Issue Description:
Our codebase adds a function,
clamp(Bound)
, toCountableRange
using themin()
andmax()
functions fromSequence
. Using the latest nightlyswift-DEVELOPMENT-SNAPSHOT-2018-03-14-a
, it fails to compile witherror: ambiguous reference to member 'min(by:)'
It looks like any reference to
min()
ormax()
fails:The text was updated successfully, but these errors were encountered: