Bug 3215 - Compiler crash when using dynamic and naming a property DateTime
Summary: Compiler crash when using dynamic and naming a property DateTime
Status: RESOLVED FIXED
Alias: None
Product: Compilers
Classification: Mono
Component: C# ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2012-02-02 20:10 UTC by Andrey Tabachnik
Modified: 2012-02-03 13:15 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
a simple project that crashes the compiler (4.32 KB, application/zip)
2012-02-02 20:10 UTC, Andrey Tabachnik
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Andrey Tabachnik 2012-02-02 20:10:06 UTC
Created attachment 1312 [details]
a simple project that crashes the compiler

using System;

namespace TPL
{
    public class LogEntry
    {
        public DateTime DateTime { get; private set; }

        public LogEntry()
        {
        }

        public LogEntry(dynamic json)
        {
            this.DateTime = DateTime.ParseExact(json.DateTime, "r", null);
        }

    }

}

The code is also attached.
The compiler crashes with the following error:
Error: The compiler appears to have crashed. Check the build output pad for details. (TPL)


Building: concepts (Debug|x86)

Building Solution concepts

Building: TPL (Debug|x86)

Performing main compilation...
/Library/Frameworks/Mono.framework/Versions/2.10.8/bin/dmcs /noconfig "/out:/Users/andreytabachnik/Projects/concepts/TPL/bin/Debug/TPL.exe" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/4.0/System.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/4.0/Microsoft.CSharp.dll" "/r:/Library/Frameworks/Mono.framework/Versions/2.10.8/lib/mono/4.0/System.Core.dll" /nologo /warn:4 /debug:+ /debug:full /optimize- /codepage:utf8 /platform:x86 "/define:DEBUG"  /t:exe "/Users/andreytabachnik/Projects/concepts/TPL/Main.cs" "/Users/andreytabachnik/Projects/concepts/TPL/AssemblyInfo.cs" "/Users/andreytabachnik/Projects/concepts/TPL/LogEntry.cs" 


Unhandled Exception: Mono.CSharp.InternalErrorException: /Users/andreytabachnik/Projects/concepts/TPL/LogEntry.cs(16,16): TPL.LogEntry.LogEntry(dynamic) ---> System.InvalidCastException: Cannot cast from source type to destination type.
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DelegateInvocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression binder, Mono.CSharp.Arguments arguments, Boolean isStatement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DelegateInvocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression binder, Mono.CSharp.Arguments arguments, Boolean isStatement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.PropertyExpr.EmitAssign (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression source, Boolean leave_copy, Boolean prepare_for_load) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Assign.Emit (Mono.CSharp.EmitContext ec, Boolean is_statement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Assign.EmitStatement (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.StatementExpression.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Block.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Block.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ExplicitBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Constructor.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.TypeContainer.EmitConstructors () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.CSharp.TypeContainer.EmitConstructors () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.TypeContainer.EmitType () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ModuleContainer.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.AssemblyDefinition.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: Mono.CSharp.InternalErrorException: /Users/andreytabachnik/Projects/concepts/TPL/LogEntry.cs(16,16): TPL.LogEntry.LogEntry(dynamic) ---> System.InvalidCastException: Cannot cast from source type to destination type.
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DelegateInvocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression binder, Mono.CSharp.Arguments arguments, Boolean isStatement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DelegateInvocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression binder, Mono.CSharp.Arguments arguments, Boolean isStatement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.PropertyExpr.EmitAssign (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression source, Boolean leave_copy, Boolean prepare_for_load) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Assign.Emit (Mono.CSharp.EmitContext ec, Boolean is_statement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Assign.EmitStatement (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.StatementExpression.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Block.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Block.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ExplicitBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Constructor.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.TypeContainer.EmitConstructors () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.CSharp.TypeContainer.EmitConstructors () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.TypeContainer.EmitType () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ModuleContainer.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.AssemblyDefinition.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 



Unhandled Exception: Mono.CSharp.InternalErrorException: /Users/andreytabachnik/Projects/concepts/TPL/LogEntry.cs(16,16): TPL.LogEntry.LogEntry(dynamic) ---> System.InvalidCastException: Cannot cast from source type to destination type.
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DelegateInvocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression binder, Mono.CSharp.Arguments arguments, Boolean isStatement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DelegateInvocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression binder, Mono.CSharp.Arguments arguments, Boolean isStatement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.PropertyExpr.EmitAssign (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression source, Boolean leave_copy, Boolean prepare_for_load) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Assign.Emit (Mono.CSharp.EmitContext ec, Boolean is_statement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Assign.EmitStatement (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.StatementExpression.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Block.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Block.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ExplicitBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Constructor.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.TypeContainer.EmitConstructors () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.CSharp.TypeContainer.EmitConstructors () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.TypeContainer.EmitType () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ModuleContainer.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.AssemblyDefinition.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 
[ERROR] FATAL UNHANDLED EXCEPTION: Mono.CSharp.InternalErrorException: /Users/andreytabachnik/Projects/concepts/TPL/LogEntry.cs(16,16): TPL.LogEntry.LogEntry(dynamic) ---> System.InvalidCastException: Cannot cast from source type to destination type.
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DelegateInvocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression binder, Mono.CSharp.Arguments arguments, Boolean isStatement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DelegateInvocation.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression binder, Mono.CSharp.Arguments arguments, Boolean isStatement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.DynamicExpressionStatement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Argument.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Arguments.Emit (Mono.CSharp.EmitContext ec, Boolean dup_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Invocation.EmitCall (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression instance_expr, Mono.CSharp.MethodSpec method, Mono.CSharp.Arguments Arguments, Location loc, Boolean dup_args, Boolean omit_args) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.PropertyExpr.EmitAssign (Mono.CSharp.EmitContext ec, Mono.CSharp.Expression source, Boolean leave_copy, Boolean prepare_for_load) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Assign.Emit (Mono.CSharp.EmitContext ec, Boolean is_statement) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Assign.EmitStatement (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.StatementExpression.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Statement.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Block.DoEmit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Block.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ExplicitBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ToplevelBlock.Emit (Mono.CSharp.EmitContext ec) [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Constructor.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.TypeContainer.EmitConstructors () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Mono.CSharp.TypeContainer.EmitConstructors () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.TypeContainer.EmitType () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.ModuleContainer.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.AssemblyDefinition.Emit () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Compile () [0x00000] in <filename unknown>:0 
  at Mono.CSharp.Driver.Main (System.String[] args) [0x00000] in <filename unknown>:0 
Build complete -- 1 error, 0 warnings

---------------------- Done ----------------------

Build: 1 error, 0 warnings
Comment 1 Marek Safar 2012-02-03 06:05:16 UTC
Fixed in master.

However, your code won't do what you presumably intended to do. DateTime.ParseExact call will fail because you call a static method on an instance variable.
Comment 2 Andrey Tabachnik 2012-02-03 13:10:36 UTC
That is a good point. But should not the compiler recognize that a static method is called? VS c# compiler seems to do that.
Comment 3 Marek Safar 2012-02-03 13:15:43 UTC
It will but only at runtime because it's not known during compilation which method will be chosen