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

Property limitations #53

Closed
Paril opened this issue Jan 2, 2025 · 2 comments
Closed

Property limitations #53

Paril opened this issue Jan 2, 2025 · 2 comments

Comments

@Paril
Copy link

Paril commented Jan 2, 2025

class Foo
{
    int _v;

    // nb: if asEP_PROPERTY_ACCESSOR_MODE is set to 2, this doesn't require `property`
    int get_v() property { return _v; }
    void set_v(int value) property { _v  = value; }

    // these work fine tho
    int propv
    {
        get const { return _v; }
        // not a bug per se, but "value" doesn't
        // appear to be a variable if hovered over.
        // it is properly typed though.
        set { _v = value; }
    }
}

void test()
{
    Foo f;

    // error; should see `v` as a prop
    f.v = 50;

    // works, but should have error for not
    // having a setter
    f.propv = 50;
}
@MineBill
Copy link
Contributor

MineBill commented Jan 2, 2025

Same as #21.

@Paril
Copy link
Author

Paril commented Jan 2, 2025

Oops, I missed that one. Thanks

@Paril Paril closed this as completed Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants