```
public class TestItem
{
public string Str { get; set; }
}
class Program
{
static void Main(string[] args)
{
using (var runtime = new V8Runtime())
using (var engine = runtime.CreateScriptEngine())
{
engine.AddHostObject("test", new TestItem());
string scriptCode = "test";
V8Script compiledScript = runtime.Compile(scriptCode);
object result = engine.Evaluate(scriptCode); //TestItem type
object resultFromCompiled = engine.Evaluate(compiledScript); // HostObject type
if (!result.Equals(resultFromCompiled)) // Different type of objects.
throw new ApplicationException();
}
Console.ReadLine();
}
}
```
Comments: Wow, the test code calls that method seven times but never examines the return value. We'll post a fix later today. Thanks alexeyt!
public class TestItem
{
public string Str { get; set; }
}
class Program
{
static void Main(string[] args)
{
using (var runtime = new V8Runtime())
using (var engine = runtime.CreateScriptEngine())
{
engine.AddHostObject("test", new TestItem());
string scriptCode = "test";
V8Script compiledScript = runtime.Compile(scriptCode);
object result = engine.Evaluate(scriptCode); //TestItem type
object resultFromCompiled = engine.Evaluate(compiledScript); // HostObject type
if (!result.Equals(resultFromCompiled)) // Different type of objects.
throw new ApplicationException();
}
Console.ReadLine();
}
}
```
Comments: Wow, the test code calls that method seven times but never examines the return value. We'll post a fix later today. Thanks alexeyt!