Bug description
As title. Related to #4199. CC @dgurchenkov.
Steps to reproduce
Code:
@value
struct Ptr[dtype: DType = DType.int32]:
fn store(self, offset: Int, val: Int):
pass
fn store[width: Int, //](self, offset: Int):
pass
fn main():
p = Ptr()
i = 1
p.store[width=4](i) # error
Error:
/workspaces/ubuntu/max/playground/main.mojo:31:19: error: no matching method in call to 'store'
p.store[width=4](i)
~~~~~~~~~~~~~~~~^~~
/workspaces/ubuntu/max/playground/main.mojo:22:6: note: candidate not viable: missing 1 required positional argument: 'val'
fn store(self, offset: Int, val: Int):
^
/workspaces/ubuntu/max/playground/main.mojo:25:6: note: candidate not viable: inferred parameter passed out of order: 'width'
fn store[width: Int, //](self, offset: Int):
System information
mojo 25.4.0.dev2025050905 (e3051145)