[Mono-bugs] [Bug 660530] New: Compiler generated variables are all using the same name

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Dec 20 08:46:18 EST 2010


https://bugzilla.novell.com/show_bug.cgi?id=660530

https://bugzilla.novell.com/show_bug.cgi?id=660530#c0


           Summary: Compiler generated variables are all using the same
                    name
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: msafar at novell.com
        ReportedBy: spouliot at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


xMCS generates the same variable name "<$$>" inside foreach loop (and likely
other places too). E.g.

foreach (AssemblyDefinition assembly in Runner.Assemblies) {
    foreach (ModuleDefinition module in assembly.Modules) {
        foreach (TypeDefinition type in module.GetAllTypes ()) {

will produce several variables named "<$$>". This seems to comes from:

        public static LocalVariable CreateCompilerGenerated (TypeSpec type,
Block block, Location loc)
        {
            LocalVariable li = new LocalVariable (block, "<$$>",
Flags.CompilerGenerated | Flags.Used, loc);
            li.Type = type;
            return li;
        }

This confuse some Gendarme rules into reporting defects that do not exists. I
suspect this can also confuse other tools too (e.g. debugger).

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


More information about the mono-bugs mailing list