[Mono-bugs] [Bug 639603] New: invoke on ExpandoObject member fails
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Wed Sep 15 13:46:19 EDT 2010
https://bugzilla.novell.com/show_bug.cgi?id=639603
https://bugzilla.novell.com/show_bug.cgi?id=639603#c0
Summary: invoke on ExpandoObject member fails
Classification: Mono
Product: Mono: Compilers
Version: 2.8.x
Platform: 64bit
OS/Version: Windows Vista
Status: NEW
Severity: Major
Priority: P5 - None
Component: C#
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: robreiss at hotmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
Blocker: ---
User-Agent: Mozilla/5.0 (Windows NT 6.0; WOW64; rv:2.0b5) Gecko/20100101
Firefox/4.0b5
Running Mono C# Compiler as a Service on Microsoft .Net 4.0 runtime the
following fails:
csharp> using System.Dynamic;
csharp> dynamic d = new ExpandoObject();
csharp> d.test = new Action(delegate() { Console.WriteLine("worked"); });
System.Action
csharp> d.test();
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot implicitly
convert type 'void' to 'object'
Reproducible: Always
Steps to Reproduce:
Mono C# Shell, type "help;" for help
Enter statements below.
csharp> using System.Dynamic;
csharp> dynamic d = new ExpandoObject();
csharp> d.test = new Action(delegate() { Console.WriteLine("worked"); });
System.Action
csharp> d.test();
Microsoft.CSharp.RuntimeBinder.RuntimeBinderException: Cannot implicitly
convert type 'void' to 'object'
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site,
T0 arg0)
at CallSite.Target(Closure , CallSite , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute1[T0,TRet](CallSite site,
T0 arg0)
at Class2.Host(Object& $retval)
at Mono.CSharp.Evaluator.Evaluate(String input, Object& result, Boolean&
result_set) in C:\Users\RobReiss\Downloads\mono-mono-9-15\mcs\mcs\eval.cs:line
361
at Mono.CSharpShell.Evaluate(String input) in
C:\Users\RobReiss\Downloads\mono-mono-9-15\mcs\tools\csharp\repl.cs:line 291
csharp>
Actual Results:
error
Expected Results:
"worked"
--
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