c3c icon indicating copy to clipboard operation
c3c copied to clipboard

Target object of method is not null checked

Open Caleb-o opened this issue 1 year ago • 1 comments

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
}

Caleb-o avatar Oct 14 '24 11:10 Caleb-o

This should now work properly.

lerno avatar Oct 20 '24 22:10 lerno

This now generates a proper null pointer error.

sandervdbosch avatar Nov 08 '24 15:11 sandervdbosch