Skip to content

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

@yusuketa

Description

@yusuketa

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_"))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions