Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit d297f73

Browse files
committed
Fix PCL version of ReflectedType to use substitutable DeclaringType not Field/Property Type
1 parent 5216dab commit d297f73

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ServiceStack.Text/ReflectionExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ public static Type BaseType(this Type type)
771771
public static Type ReflectedType(this PropertyInfo pi)
772772
{
773773
#if (NETFX_CORE || PCL)
774-
return pi.PropertyType;
774+
return pi.DeclaringType;
775775
#else
776776
return pi.ReflectedType;
777777
#endif
@@ -780,7 +780,7 @@ public static Type ReflectedType(this PropertyInfo pi)
780780
public static Type ReflectedType(this FieldInfo fi)
781781
{
782782
#if (NETFX_CORE || PCL)
783-
return fi.FieldType;
783+
return fi.DeclaringType;
784784
#else
785785
return fi.ReflectedType;
786786
#endif

0 commit comments

Comments
 (0)