Skip to content

Scripts with a void return value throw exception when the receiver is dynamic. #170

@tenor

Description

@tenor

Executing the following script will throw a Cannot implicitly convert type 'void' to 'object' exception.

class SomeClass
{
    public void Do()
    {
    }
}
dynamic d = new SomeClass();
d.Do()

The script runs successfully if the dynamic keyword is changed to 'var'.

I have created PR 169 to include the failing test cases in ScriptTests.cs.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions