bugDotGNU Portable.NET - Bugs: bug #11432, Compiler confuses types and...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #11432: Compiler confuses types and fields, but only if there is an attribute

Submitter:  James Michael DuPont <mdupont>
Submitted:  Wed 29 Dec 2004 11:46:10 AM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Fri 31 Dec 2004 01:09:22 PM UTC, comment #1: 

This error occurs when compiling mono
./class/System.XML/System.Xml.Serialization/SerializationCodeGeneratorConfiguration.cs

System.Xml.Serialization/SerializationCodeGeneratorConfiguration.cs:66: `SerializationFormat' is not declared as a type in the current scope

James Michael DuPont <mdupont>
Wed 29 Dec 2004 11:46:10 AM UTC, original submission:  

// the compiler thinks this a BOOM::BOO is a type an a field. gets confused
namespace FOO
{
public class Funky : Attribute
{
public Funky (object value) { }
}
public enum BOO { BAZ }

public class BAM
{
[Funky (BOO.BAZ)]
public BOO BOO2 = BOO.BAZ;

[Funky (BOO.BAZ)]
public BOO BOO3 = BOO.BAZ;
}

public class BOOF
{
public BOO BOO2 = BOO.BAZ;
public BOO BOO = BOO.BAZ;// same name -- no attribute

}
public class BOOM
{
[Funky (BOO.BAZ)]
public BOO BOO2 = BOO.BAZ;// different name // `BOO' is not declared as a type in the current scope
[Funky (BOO.BAZ)]
public BOO BOO = BOO.BAZ;// same name -- PROBLEM `BOO' is not declared as a type in the current scope

}
}

James Michael DuPont <mdupont>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

No changes have been made to this item

Back to the top

Powered by Savane 3.13-da57.
Corresponding source code