Skip to content

withValuePointer() sees object not as a class instance but an existential instance #81

@NSExceptional

Description

@NSExceptional

I'm not sure what's going on, but whatever it is I think I might be doing something wrong.

Here is a project that demonstrates the issue: https://github.com/FLEXTool/SwiftEX

Select the SwiftEXTests scheme and run the testMirror() test. It fails. My testing shows that for some reason, Value.self inside the call to withValuePointer() is seen as an existential instead of a class type. It appears to be correct, too, which tells me I'm the one doing something wrong.

The gist of what I'm trying to do is to wrap your APIs and make it work like a readwrite Mirror, so that I don't have to fumble with .property(named:) and property.set(value:on:) or property.get(on:) every time I want to do something.

Any help is appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions