Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
tmteam opened this issue Mar 20, 2023 · 1 comment
Closed

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

tmteam opened this issue Mar 20, 2023 · 1 comment
Labels
Api Nfun syntax is not changed, but C# syntax is invalid This doesn't seem right

Comments

@tmteam
Copy link
Owner

tmteam commented Mar 20, 2023


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 tmteam added bug Something isn't working invalid This doesn't seem right Api Nfun syntax is not changed, but C# syntax is and removed bug Something isn't working labels Mar 20, 2023
@tmteam tmteam added this to the Nfun meta language milestone Mar 20, 2023
tmteam added a commit that referenced this issue Mar 26, 2023
@tmteam
Copy link
Owner Author

tmteam commented Mar 26, 2023

Won't do. Use this instead

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

@tmteam tmteam closed this as completed Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Api Nfun syntax is not changed, but C# syntax is invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

1 participant