Bug fix: CompositionProxyTypeBuilder crashed when class has protected constructor.
This commit is contained in:
@@ -197,8 +197,8 @@ namespace Spring.Proxy
|
||||
{
|
||||
il.Emit(OpCodes.Ldarg_S, i);
|
||||
}
|
||||
il.Emit(OpCodes.Newobj, TargetType.GetConstructor(
|
||||
ReflectionUtils.GetParameterTypes(constructor.GetParameters())));
|
||||
|
||||
il.Emit(OpCodes.Newobj, constructor);
|
||||
il.Emit(OpCodes.Stfld, targetInstance);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
namespace Spring.Objects
|
||||
{
|
||||
public class ClassWithProtectedCtor : IOther
|
||||
{
|
||||
protected ClassWithProtectedCtor()
|
||||
{
|
||||
}
|
||||
|
||||
public void Absquatulate()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user