Skip to content
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-1512] Assertion failure: "Already marked as a fixed binding" when implementing index(_:offsetBy:limit:) #44121

Closed
karwa opened this issue May 13, 2016 · 1 comment
Assignees
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software type checker Area → compiler: Semantic analysis

Comments

@karwa
Copy link
Contributor

karwa commented May 13, 2016

Previous ID SR-1512
Radar None
Original Reporter @karwa
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Swift version 3.0-dev (LLVM 752e1430fc, Clang 1e6cba3ce3, Swift ad34f89)
Target: x86_64-apple-macosx10.9

On 10.11.4, trying to compile in Xcode or manually with command:
xcrun --toolchain swift3dev -sdk macosx swift test.swift

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, CompilerCrash, TypeChecker
Assignee @rudkx
Priority Medium

md5: 538ac21c4c0d1177c701d3635c827a82

is duplicated by:

  • SR-1902 Computed getter type inference bug
  • SR-2635 Crash with Xcode 8 Swift compiler
  • SR-2766 Segmentation fault on optional multiplication
  • SR-2852 String interpolation causes segmentation fault

Issue Description:

See attached code sample. Causes an assertion failure every time.

Commenting out the function: `public func index(_ idx: C.Index, offsetBy offset: C.IndexDistance, limitedBy limit: C.Index? = nil) -> C.Index` resolves the assertion failure.

My idea was that implementing this method may allow the compiler to emit more efficient calls when using WrappedCollection to wrap a RandomAccessCollection (as it would know the exact type of C). I don't know if that's true or not, but we shouldn't hit an assertion failure in any case.

@DougGregor
Copy link
Member

b295106

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added the crash Bug: A crash, i.e., an abnormal termination of software label Dec 12, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself crash Bug: A crash, i.e., an abnormal termination of software type checker Area → compiler: Semantic analysis
Projects
None yet
Development

No branches or pull requests

3 participants