[Mono-bugs] [Bug 635714] New: Disparity between gmcs/microsoft csc: CS0051: Inconsistent accessibility

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Aug 30 23:03:43 EDT 2010



           Summary: Disparity between gmcs/microsoft csc: CS0051:
                    Inconsistent accessibility
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.4.x
          Platform: x86-64
        OS/Version: RHEL 5
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: len at netvalue.net.nz
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9pre)

The following code compiles fine on microsoft csc but fails on gmcs:

using System;

public class Test2 {
  protected internal class Foo {

  private sealed class Bar {
    public Bar(Test2.Foo baseArg4) {
  static void Main() {

Reproducible: Always

Steps to Reproduce:
1. Compile the test program
Actual Results:  
gmcs fails with:
gmcs ~/Test2.cs
/home2/len/Test2.cs(8,12): error CS0051: Inconsistent accessibility: parameter
type `Test2.Foo' is less accessible than method `Test2.Bar.Bar(Test2.Foo)'
/home2/len/Test2.cs(4,28): (Location of the symbol related to previous error)
Compilation failed: 1 error(s), 0 warnings

Expected Results:  
Should succeed, like this:
C:\Users\len>csc Test2.cs
Microsoft (R) Visual C# 2008 Compiler version 3.5.30729.4926
for Microsoft (R) .NET Framework version 3.5
Copyright (C) Microsoft Corporation. All rights reserved.

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

More information about the mono-bugs mailing list