Open dabrahams opened 7 years ago
@swift-ci create
So this was triggered by commenting out the IndexDistance
associated type in Collection
, which is duplicated or shadowed by another declaration in _Indexable
. If you uncomment it, you get this error which makes it look like the compiler thinks IndexDistance
can be two different types:
cd /Users/dave/src/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core && /Users/dave/brew/Cellar/cmake/3.8.0/bin/cmake -E remove -f /Users/dave/src/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/Swift.swiftmodule && /Users/dave/brew/Cellar/cmake/3.8.0/bin/cmake -E remove -f /Users/dave/src/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/Swift.swiftdoc && /usr/bin/python /Users/dave/src/s/swift/utils/line-directive @/Users/dave/src/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core/URwCj.txt -- /Users/dave/src/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./bin/swiftc -emit-module -o /Users/dave/src/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64/Swift.swiftmodule -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -target x86_64-apple-macosx10.9 -resource-dir /Users/dave/src/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./lib/swift -F /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/../../../Developer/Library/Frameworks -Onone -g -D INTERNAL_CHECKS_ENABLED -I /Users/dave/src/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./lib/swift/macosx/x86_64 -module-cache-path /Users/dave/src/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/./module-cache -no-link-objc-runtime -Xfrontend -enable-cow-existentials -nostdimport -parse-stdlib -module-name Swift -Xfrontend -group-info-path -Xfrontend /Users/dave/src/s/swift/stdlib/public/core/GroupInfo.json -Xfrontend -sil-serialize-all -swift-version 3 -warn-swift3-objc-inference-complete -Xllvm -sil-inline-generics -Xllvm -sil-partial-specialization -module-link-name swiftCore -force-single-frontend-invocation -Xcc -D__SWIFT_CURRENT_DYLIB=swiftCore -parse-as-library @/Users/dave/src/s/build/Ninja-ReleaseAssert+stdlib-DebugAssert/swift-macosx-x86_64/stdlib/public/core/URwCj.txt
/Users/dave/src/s/swift/stdlib/public/core/StringUnicodeScalarView.swift:528:38: error: 'IndexDistance' is ambiguous for type lookup in this context
from i: Index?, to j: Index?) -> IndexDistance {
^~~~~~~~~~~~~
/Users/dave/src/s/swift/stdlib/public/core/Collection.swift:182:18: note: found this candidate
associatedtype IndexDistance : SignedInteger = Int
^
/Users/dave/src/s/swift/stdlib/public/core/Collection.swift:646:18: note: found this candidate
associatedtype IndexDistance = Int
^
/Users/dave/src/s/swift/stdlib/public/core/StringUnicodeScalarView.swift:523:46: error: 'IndexDistance' is ambiguous for type lookup in this context
public func index(_ i: Index?, offsetBy n: IndexDistance) -> Index {
^~~~~~~~~~~~~
/Users/dave/src/s/swift/stdlib/public/core/Collection.swift:182:18: note: found this candidate
associatedtype IndexDistance : SignedInteger = Int
^
/Users/dave/src/s/swift/stdlib/public/core/Collection.swift:646:18: note: found this candidate
associatedtype IndexDistance = Int
^
Which don't seem right neither.
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 1 | |Component/s | Compiler | |Labels | Bug, CompilerCrash, TypeChecker | |Assignee | @DougGregor | |Priority | Medium | md5: b40669f3339f6c172e75017672b4032eIssue Description:
Other hashes