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

Fix m reassignment bug #1303

Open
TwitchBronBron opened this issue Sep 23, 2024 · 2 comments
Open

Fix m reassignment bug #1303

TwitchBronBron opened this issue Sep 23, 2024 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@TwitchBronBron
Copy link
Member

class Test
    sub rewrite()
        m = m.list
        if 1 > m.value 
        end if
    end sub
end class

image

@TwitchBronBron TwitchBronBron added the bug Something isn't working label Sep 23, 2024
@TwitchBronBron TwitchBronBron added this to the v1.0.0 milestone Sep 23, 2024
@markwpearce
Copy link
Collaborator

markwpearce commented Dec 15, 2024

The example is showing as an error because m is the class Test OR it is an unresolved m.list ... so m is not completely resolvable.

There is no error with this code:

class Test
    list ' define the list property
    sub rewrite()
        m = m.list
        if 1 > m.value 
        end if
    end sub
end class

@markwpearce
Copy link
Collaborator

Ideally, this would show that m.list could not be found,... which, btw, does show up if you did:

x = m.list

I think we could push this out to v1.1, or whenever we add better code-flow validation - eg, when we we properly track types as code flows through a function

@markwpearce markwpearce modified the milestones: v1.0.0, v1.1.0 Dec 17, 2024
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