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


           Summary: [Regression] Compiler disallows default(SomeType) for
                    values in anonymous types
    Classification: Mono
           Product: Mono: Compilers
           Version: SVN
          Platform: Macintosh
        OS/Version: Mac OS X 10.5
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: C#
        AssignedTo: [email protected]
        ReportedBy: [email protected]
         QAContact: [email protected]
          Found By: ---


User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_6; en-us)
AppleWebKit/525.27.1 (KHTML, like Gecko) Version/3.2.1 Safari/525.27.1

Here's some code:

---

using System;

namespace MonoBug
{
    public static class Program
    {
        public static void Main()
        {
            var foo = new { Value = default(string) };
            Console.WriteLine(foo.Value);
        }
    }
}

---

It works under csc and gmcs 2.2, but it fails in gmcs from svn.

Reproducible: Always

Steps to Reproduce:
1. Put the code above into a cs file
2. Try to build with gmcs
Actual Results:  
Compilation fails with CS0828.

Expected Results:  
Compilation should succeed.

Possibly related to bug 476811.

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

Reply via email to