Open litewrap opened 5 months ago
I just found something very weird.
If I rename "MyObject" to "MyCar" now the issue is gone, and the C++ code works ok. Regardless MyCar is a struct or a class.
If I rename to "MyOldCar" the issue appear. In fact any class naming beginning with "MyO" will fail ex: "MyOABCDEFGH" will fail.
So.. it seems maybe the emitted C++ header have problem with some class naming.
I hope this can help.
Description
The context: On Swift side, when calling a method within a class that return an array of class. The problem: Calling the method from C++ failed with message like "Use of undeclared identifier" in the C++ header file
Reproduction
Swift Side:
C++ side:
Expected behavior
compile with no errors.
Note1: If MyObject is a struct instead of a class there is no errors. Calling the method getArray() success. Note2: if the function getArray() is placed at top level instead of inside a class, the call is fine with no errors, regardless MyObject is a class or a struct.
Environment
admin@mbam1 CxxSide % swiftc --version swift-driver version: 1.87.3 Apple Swift version 5.9.2 (swiftlang-5.9.2.2.56 clang-1500.1.0.2.5) Target: arm64-apple-macosx13.0 admin@mbam1 CxxSide %
Additional information
Tried with current Swift 5.9.2 and DEV SNAPSHOT 5.11, same error.