Currently all generated extension methods are public regardless of the visibility of the variant type.
Thus the following generates invalid code because the generated extensions have inconsistent accessibility:
namespace Foo
{
internal class A { }
[dotVariant.Variant]
public partial class Variant
{
static partial void VariantOf(A a);
}
}
// generated code:
public static class VariantEx
{
// CS0051 and CS0057: Inconsistent accessibility
public static void Match(this Variant v, out A a) { ... }
}