tmteam / NFun

Expressions Evaluator for .NET
MIT License
57 stars 4 forks source link

Custom types cannot be used as output types in Hardcore mode #69

Closed tmteam closed 1 year ago

tmteam commented 1 year ago

var runtime = Funny
    .WithApriori<User>("foo")
    .Build("foo = {name = 'peter'}");
runtime.Run();

var type = runtime["foo"].Value.GetType() 
// 'User' expected, but `IReadonlyDictionary<string,object>` found
tmteam commented 1 year ago

Won't do. Use this instead

T result = runtime["foo"].CreateGetterOf<T>()()