Open swift-ci opened 2 years ago
Comment by Michael Rockhold (JIRA)
Same crash is caused by this much smaller file:
// SmallerMain.swift
import Foundation
protocol Component {
func emit() -> String
}
struct EmptyElement: Component {
func emit() -> String { "" }
}
struct FinalResult: Component {
let contents: [Component]
func emit() -> String { "" }
}
@resultBuilder
struct BodyBuilder {
static func buildOptional(_ component: Component?) -> Component {
guard let component = component else { return EmptyElement() }
return component
}
static func buildEither(first component: Component) -> Component {
return component
}
static func buildEither(second component: Component) -> Component {
return component
}
static func buildArray(_ components: [Component]) -> Component {
return FinalResult(contents: components)
}
static func buildBlock(_ components: Component...) -> Component {
return FinalResult(contents: components)
}
static func buildFinalResult(_ component: Component) -> FinalResult {
return FinalResult(contents: [component])
}
}
struct TableCell: Component {
@BodyBuilder let contents: FinalResult
func emit() -> String { "" }
}
Attachment: Download
Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | | |Labels | Bug | |Assignee | None | |Priority | Medium | md5: ec9518df9a8b9b81fc51f1ab1c989a5aIssue Description:
Given file main.swift (attached), and the command, "% swiftc main.swift",
encounter error message:
IntToPtr source must be an integral
%3 = inttoptr i8* %0 to %swift.bridge*, 863
in function $s4main11TableHeaderV13columnHeadersACSayAA06ColumnC0VGyXE_tcfC