C++ interop - Crash on defining a function ptr that takes a std string #74588
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
c++ interop
Feature: Interoperability with C++
c++ to swift
Feature → c++ interop: c++ to swift
compiler
The Swift compiler itself
crash
Bug: A crash, i.e., an abnormal termination of software
function types
Feature → types: function types
SILGen
Area → compiler: The SIL generation stage
swift 5.10
types
Feature: types
Description
The Swift Compiler crashes when I try to define a function pointer declared from C++ in swift code. The function takes in a
std::string
and returnsvoid
.Reproduction
Swift Code
C++ Code
Stack dump
Expected behavior
I expected the compiler to parse cpp-defined function ptrs using a Swift closure.
Environment
swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5)
Additional information
No response
The text was updated successfully, but these errors were encountered: