Files
swift-mirror/test/Driver/issue-70016-emit-objc-header-with-empty-struct.swift
Richard Wei 51acf75cb5 Fix compiler crash when emitting objc header with C++ interop enabled
This was because `LoweredFunctionSignature::visitParameterList` has a special case for parameters with an empty LLVM representation (e.g. an empty struct) but forgot to increment the counter, which then tripped the assertion.

Resolves #70016.
2023-11-24 02:25:08 -08:00

5 lines
208 B
Swift

// RUN: %target-swift-frontend %s -emit-module -emit-objc-header-path %t/Issue70016-Swift.h -module-name Issue70016 -cxx-interoperability-mode=default
public struct Struct {}
public func foo(_ x: Struct) {}