Skip to content

[SR-2669] Seg fault iterating [protocolName] #45274

Closed
@swift-ci

Description

@swift-ci
Previous ID SR-2669
Radar rdar://28341588
Original Reporter daniel (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

xcode 8 GM
2011 13" mba
OSX 10.11.6

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

md5: d916ead704eb4cfda11e65bda80a649c

Issue Description:

I'm not 100% on the cause, but I attached the reproducible test case. Compiler segfaults when compiling this:

import Foundation
@objc protocol SelectionItem:NSObjectProtocol {
    var time:Double {get set }
}

class Selection: NSObject {
    var contents = [SelectionItem]()
    
    convenience init(initialContents:[SelectionItem]) {
        self.init()
        contents = initialContents
    }
    
    func offsetKeyframes(_ offset:Double) {
        for i in 0..<contents.count {
            contents[i].time += offset
        }
    }
}

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfcrashBug: A crash, i.e., an abnormal termination of software

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions