[Mono-bugs] [Bug 663059] New: Missing CS0507 when using InternalsVisibleTo

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Jan 7 11:31:28 EST 2011



           Summary: Missing CS0507 when using InternalsVisibleTo
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.8.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: msafar at novell.com
        ReportedBy: jpobst at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

Make two files:

using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo ("Class2")]

namespace ClassLibrary1
    public class Class1
        protected internal virtual string GetString ()
            return "Hello";

namespace ClassLibrary1
    public sealed class Class2 : Class1
        protected override string GetString ()
            return "Hello2";

- gmcs /target:library Class1.cs
- gmcs /target:library /r:Class1 Class2.cs

Expected Results:
csc provides:

Class3.cs(9,29): error CS0507: ClassLibrary1.Class3.GetString)': cannot change
access modifiers when overriding 'protected internal' inherited member

Class1.dll: (Location of symbol related to previous error)

Actual Results:
gmcs compiles without error

This was found trying to compile Mono's System.Web using csc.

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list