https://bugzilla.novell.com/show_bug.cgi?id=379537
Summary: [GMCS] CS0649 should not be reported for fields assigned
to using named parameters in CAs
Product: Mono: Compilers
Version: SVN
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P5 - None
Component: C#
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
QAContact: [email protected]
Found By: ---
gmcs should not report CS0649 for fields of Attribute classes that are assigned
to using named parameters.
MS fixed this in csc 2.x.
To reproduce, compile the following code:
using System;
[Foo (Product="Mono", Country="US")]
class Program
{
static void Main ()
{
}
}
class FooAttribute : Attribute
{
public string Product;
public string Company;
private string country;
private string town;
public FooAttribute ()
{
}
public string Country {
get { return country; }
set { country = value; }
}
public string Town {
get { return town; }
set { town = value; }
}
}
Expected result:
test.cs(14,16): error CS0649: Warning as Error: Field 'FooAttribute.Company' is
never assigned to, and will always have its default value null
Actual result:
test.cs(13,23): error CS0649: Field `FooAttribute.Product' is never assigned
to, and will always have its default value `null'
test.cs(14,23): error CS0649: Field `FooAttribute.Company' is never assigned
to, and will always have its default value `null'
--
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.
_______________________________________________
mono-bugs maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs