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

Native object property setter causes an error in RnWinRT.exe #211

Open
yusuketa opened this issue Mar 25, 2022 · 1 comment
Open

Native object property setter causes an error in RnWinRT.exe #211

yusuketa opened this issue Mar 25, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@yusuketa
Copy link

yusuketa commented Mar 25, 2022

Trying to reuse an existing relatively large C++/CX component and to project it to JavaScript, the following error is hit by RnWinRT.exe.

react-native-winrt-main\rnwinrt\rnwinrt\MetadataTypes.cpp
method_class classify_method(const MethodDef& def)
    throw std::runtime_error("Unknown method type");

The component has a property like the following.

public interface class IFace1
{
    property bool Prop1
    {
        bool get();
        void set(bool value);
    }
}

The following resolved the issue. Is this appropriate to merge?

<<    else if (starts_with(name, "put_"))
>>    else if (starts_with(name, "put_") || starts_with(name, "set_"))
@dunhor
Copy link
Member

dunhor commented Mar 25, 2022

Seems reasonable to me. Kind of curious why C++/CX doesn't follow the behavior of MIDLRT, and kind of curious why C++/WinRT doesn't either, but I see no issues with the change if this is behavior you're seeing.

@dunhor dunhor added the bug Something isn't working label Jul 27, 2022
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

2 participants