diff --git a/runtime/DynamicTypeWrapper.cs b/runtime/DynamicTypeWrapper.cs index 2e56f661..a3c7d7d1 100644 --- a/runtime/DynamicTypeWrapper.cs +++ b/runtime/DynamicTypeWrapper.cs @@ -5997,7 +5997,7 @@ namespace IKVM.Internal private bool NeedsType2AccessStub(FieldWrapper fw) { Debug.Assert(this.IsPublic && fw.DeclaringType == this); - return (fw.HasNonPublicTypeInSignature || (fw.IsFinal && !classLoader.StrictFinalFieldSemantics && !(fw is ConstantFieldWrapper) && !(fw is DynamicPropertyFieldWrapper))) + return (fw.HasNonPublicTypeInSignature || (fw.IsFinal && !this.IsInterface && !classLoader.StrictFinalFieldSemantics && !(fw is ConstantFieldWrapper) && !(fw is DynamicPropertyFieldWrapper))) && (fw.IsPublic || (fw.IsProtected && !this.IsFinal)) && (fw.FieldTypeWrapper.IsUnloadable || fw.FieldTypeWrapper.IsAccessibleFrom(this) || fw.FieldTypeWrapper.InternalsVisibleTo(this)); }