Outer constructor not getting called despite being in stack trace?

Ohhh I didn’t even think to just provide the parameter type in the outer constructor as well. What I ended up doing was just defining an inner constructor with all the type parameters present, but it feels a bit redundant since it doesn’t really “do” anything like check argument validity etc.

I didn’t want to make the parameterless constructor an inner constructor since I’ll also want to provide at least a State{InpIterState}(inp,is::Optional{InpIterState}) as well, and I’ve understood that generally you’d only want one inner constructor. Then again, I seem to follow best practices pretty selectively since apparently using constructors to provide default type parameters like I’ve been doing and was planning to do with State{InpIterState}(inp,is) is somewhat inadvisable as well due to some potential ambiguities (see this comment)

1 Like