[Mono-bugs] [Bug 582579] New: CLS compliance check (CS3019) gets confused when partial types have different public access

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Feb 24 04:02:59 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=582579

http://bugzilla.novell.com/show_bug.cgi?id=582579#c0


           Summary: CLS compliance check (CS3019) gets confused when
                    partial types have different public access
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: aenomoto at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


(This is a translated copy of
http://smdn.invisiblefulmoon.net/misc/forum/programming/#n14 reported at
http://irc.gimite.net/channel/mono-jp/archive/20100213 )

The following code contains two partial class definition for a class, which is
public and nonpublic for each.

Since the resulting class is public, CS3019 warning should not occur:

//---- repro ----
using System;

[assembly: CLSCompliant(true)]

public partial class PartialClass {
  public void Method1(int arg)
  {
  }

  [CLSCompliant(false)]
  public void Method2(uint arg)
  {
  }
}

/*public*/ partial class PartialClass {
  [CLSCompliant(false)]
  public void Method3(uint arg)
  {
  }
}

Actual result:
smdn.cs(17,4): warning CS3019: CLS compliance checking will not be performed on
`PartialClass.Method3(uint)' because it is not visible from outside this
assembly

-- 
Configure bugmail: http://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