Currently all generated methods are public regardless of the visibility of the contained type.
Thus the following generates invalid code because the generated members have inconsistent accessibility:
internal class A { }
[Variant]
public class Variant
{
static partial void VariantOf(A a);
// generated code:
// CS0051 and CS0057: Inconsistent accessibility
public void Match(out A a) { ... }
}