-
Notifications
You must be signed in to change notification settings - Fork 831
Description
protected internal in C# means famorassem, e.g. the visibility is the superset of protected and internal.
Repro steps
Class in C#:
namespace A
{
public class Class1
{
protected static int Protected;
internal static int Internal;
protected internal static int ProtectedInternal;
public static int Public;
}
}I added this to the AssemblyInfo.cs
[assembly: InternalsVisibleTo("B")]
[assembly: InternalsVisibleTo("C")]I then added two additional projects, B (C#) and C (F#).
F#

(The internal member is visible, so InternalsVisibleTo works in general)
Expected behavior
I would have expected the member ProtectedInternal to be visible.
Actual behavior
Only Internal (and public ofc.) is visible
Please not that this is notjust a tooling issue - when I try to compile the project, I get this error message:
A.Class1.ProtectedInternal <- 5
error FS1097: The struct or class field 'ProtectedInternal' is not accessible from this code location
Known workarounds
I need to modify the C# project and make the member either only internal, so that InternalsVisibleTo works, or make it public.
Related information
Provide any related information

