You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The problem that record generates the protected "copy" constructor in addition to the default constructor,
and DryIoc prefers the former because it has more parameters. Instead, DryIoc should prefer public over the non-public constructors first.
Moreover, I think that using the protected constructor for the injection is wrong because it normally supposed to be called by the other constructor of the inherited class. So I may just exclude the protected constructors from the most resolvable constructor lookup.
OK. The change with excluding the protected will be breaking and need to be more thoughtful.
But for the specific case with AutoConcrete type resolution will be enough to filter out recursive constructors with the same type as parameter.
The following code will throw a StackOverflowException, am I missing something?
.Net Fiddle
The text was updated successfully, but these errors were encountered: