swift-bridge icon indicating copy to clipboard operation
swift-bridge copied to clipboard

Add UI test for `swift_bridge(init)` attribute on function with no return type

Open chinedufn opened this issue 2 years ago • 1 comments

The following currently panics:

#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        type SomeType;
        
        #[swift_bridge(init)]
        fn new();
    }
}

We should instead have a compile time error that underlines new and says that the function should return -> SomeType.

chinedufn avatar May 11 '22 01:05 chinedufn

Here's a guide on how to add a UI test for a new compile time error.

https://chinedufn.github.io/swift-bridge/contributing/adding-compile-time-errors/index.html

If you're interested in working on this but aren't sure where to start, feel free to ask!

chinedufn avatar Jan 24 '23 13:01 chinedufn