[Mono-bugs] [Bug 659044] New: 'dynamic' keyword works in Console, but not in Unit Test

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Dec 13 00:44:53 EST 2010



           Summary: 'dynamic' keyword works in Console, but not in Unit
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.8.x
          Platform: 64bit
        OS/Version: Mac OS X 10.6
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: kevint at drivensoftware.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; en-US)
AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.215 Safari/534.10

When I create a new Console project in MonoDevelop and add the following code
it works when I run it as a Console app, but when I run the unit test it fails
with a TypeLoadException:

public class MainClass 
        public static void Main (string[] args) 
                dynamic x = "Hello World"; 
                Console.WriteLine (x); 

        public void X () 
                dynamic x = "Hello World"; 
                Console.WriteLine (x); 

Reproducible: Always

Steps to Reproduce:
1. Create a new Console project
2. Paste in the code
3. Run the program -- WORKS
4. Execute the unit test -- FAILS

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