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

Bad error message when passing a property to a ref parameter #154

Open
masonwheeler opened this issue Aug 24, 2016 · 0 comments
Open

Bad error message when passing a property to a ref parameter #154

masonwheeler opened this issue Aug 24, 2016 · 0 comments

Comments

@masonwheeler
Copy link
Contributor

class MyClass:
    [Property(Data)]
    _data as int

    def Test():
        Increment(Data)

def Increment(ref value as int):
    ++value

At first glance, it looks like this should either work, or fail with an error saying you can't pass a property to a ref parameter. But instead, it does neither, preferring to give a much less useful error:

The best overload for the method 'MyClassModule.Increment(int)' is not compatible with the argument list '(int)'. (BCE0017)

This should be fixed, either with a new error message or by adding something behind the scenes to automagically get the property value as a local, pass it, and then set the result.

@bamboo Any thoughts as to which behavior would be preferable?

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

1 participant