[Mono-bugs] [Bug 416109] New: pragma warning has no effect if only applied to ( CLSCompliant) attribute
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Sun Aug 10 09:50:06 EDT 2008
https://bugzilla.novell.com/show_bug.cgi?id=416109
Summary: pragma warning has no effect if only applied to
(CLSCompliant) attribute
Product: Mono: Compilers
Version: SVN
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: gert.driesen at pandora.be
QAContact: mono-bugs at lists.ximian.com
Found By: ---
When a CLSCompliant attribute is enclosed in #pragma warning disable/restore,
then (g)mcs still reports the warning.
Enclosing the complete method in #pragma disable/restore directive works fine.
To reproduce, compile the following code:
using System;
[assembly: CLSCompliant (true)]
public class Foo
{
#pragma warning disable 3019
[CLSCompliant (false)]
#pragma warning restore 3019
internal ushort ToUint16 ()
{
return ushort.MaxValue;
}
static void Main ()
{
}
}
Actual result:
test.cs(10,25): warning CS3019: CLS compliance checking will not be performed
on
`Foo.ToUint16()' because it is not visible from outside this assembly
Expected result:
No warning.
--
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