ModularM
Modular2y ago
21 replies
benny

partially unbound parameters as return values?

struct Person[Age: UInt8, coder: Bool]:
    ...

fn example(p: Person) -> Person[p.Age, *_]:
    ...

This code will not compile and instead gives 'Person' missing required parameter 'coder'mojo. Is this intended behavior? I can see how given lambda functions one could represent every possible relationship between compile time constants in a function, but this seems a little excessive, especially once we get into nested parametric types, any ideas?
Was this page helpful?