[Mono-bugs] [Bug 480867] New: Compiler crash on sample code

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Mar 2 03:44:27 EST 2009


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


           Summary: Compiler crash on sample code
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: i386
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: C#
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: fla83tnn at yahoo.it
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.6)
Gecko/2009020911 Ubuntu/8.04 (hardy) Firefox/3.0.6

The compiler crashes when I try to compile the following simple code:

using System;
using System.Reflection;
using System.Linq;

namespace ReflectionTest
{
       class MainClass
       {
               public static void Main(string[] args)
               {
                    AppDomain current = AppDomain.CurrentDomain;
                    Assembly[] assemblies = current.GetAssemblies();
                    var mscorelibEnumerator = (
                           from ass in AppDomain.CurrentDomain.GetAssemblies()
                               where ass.GetName().Name == "mscorlib"
                               select ass).GetEnumerator();
                    mscorelibEnumerator.MoveNext();
                    Assembly mscorelib = mscorelibEnumerator.Current;
                    var customAttributes = from attr in
                           mscorelib.GetCustomAttributes(true)
                               select attr;
                    foreach (object at in customAttributes){
                          Console.WriteLine("Tipo attributo: "+ at.GetType);
                    }
               }
       }
}

Reproducible: Always

Steps to Reproduce:
1. Copy this code in multidevelop 2.0 beta
2. try to compile 
Actual Results:  
Compiler crashes

Expected Results:  
Give an error such as: 
Error at line: "Tipo attributo: "+ at.GetType: GetType is a method and must be
called as GetType() or something like that

Monodevelop says:

[Task:File=, Line=0, Column=0, Type=Error, Priority=Normal, 
Description=/tmp/tmp13fde34.tmp]

-- 
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