I hope this is the correct group, and apologies if not. Pretty sure this compiler segfault is triggered by something amiss in the CGFloat/Double interoperability recently released.
Ringil$ swiftc --version
swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
Target: x86_64-apple-macosx12.0
Ringil$ swiftc cruft.swift
error: compile command failed due to signal 4 (use -v to see invocation)
// File: cruft.swift:
import Foundation
struct SizeHolder {
let size: CGSize
}
// Replace Double? with CGFloat? to avoid crash.
func height(sizeHolder: SizeHolder?) -> Double? {
return sizeHolder?.size.height
}
let value = height(sizeHolder: nil)