Cpp-Swift Interop fails with conformance to NSObject

I have a project where I m making direct swift calls from cpp as introduced in swift5.9. Below is my swift class whose method is being invoked on cpp.

import Foundation

public class MySwiftClass
{
    public static func testInterop () -> Void {

    NSLog("----------- hey --------")
    }
}

I m able to successfully invoke 'testInterop()' in cpp with the above class, however if I add conformance to NSObject in the 'MySwiftClass' class, then the swift call fails with the error "No member named 'MySwiftClass' in namespace 'Module2'", where Module2 is my swift target.

I m not able to identify why is this happening. Any help?

I recommend, for the most informative discussion, that you ask this question in the Swift Forums instead. You'll find people there who are actively working on this, and they'll be happy to help.

Cpp-Swift Interop fails with conformance to NSObject
 
 
Q