Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ref arrays arguments being projected as input-only #31

Open
tristanlabelle opened this issue Dec 2, 2023 · 2 comments
Open

Fix ref arrays arguments being projected as input-only #31

tristanlabelle opened this issue Dec 2, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@tristanlabelle
Copy link
Owner

        static void SwapFirstLastInt32(ref Int32[] array);

Should not result in

    public static func swapFirstLastInt32(_ array: [Swift.Int32]) throws {

The parameter should be inout.

@tristanlabelle tristanlabelle added the bug Something isn't working label Apr 8, 2024
@tristanlabelle
Copy link
Owner Author

@tristanlabelle
Copy link
Owner Author

We should project "fill" arrays as UnsafeMutableBufferPointer<T> as that allows the caller to enforce a fixed size and the callee to write values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant