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

Target object of method is not null checked #1556

Open
Caleb-o opened this issue Oct 14, 2024 · 1 comment
Open

Target object of method is not null checked #1556

Caleb-o opened this issue Oct 14, 2024 · 1 comment
Assignees
Labels
Bug Something isn't working Fixed Needs Verification Fixed, but needs verification that it works
Milestone

Comments

@Caleb-o
Copy link
Contributor

Caleb-o commented Oct 14, 2024

Currently this works, but it should have some runtime check to see if the target is null.

struct MyStructThing {
	int a;
}

fn void MyStructThing.hello(&self) {
	io::printn("Hello");
}

fn void main()
{
    MyStructThing *mst = null;
    mst.hello(); // Hello
}
@lerno lerno added the Bug Something isn't working label Oct 15, 2024
@lerno lerno self-assigned this Oct 20, 2024
@lerno lerno added this to the 0.6.4 milestone Oct 20, 2024
@lerno
Copy link
Collaborator

lerno commented Oct 20, 2024

This should now work properly.

@lerno lerno added the Fixed Needs Verification Fixed, but needs verification that it works label Oct 20, 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 Fixed Needs Verification Fixed, but needs verification that it works
Projects
None yet
Development

No branches or pull requests

2 participants