-
Notifications
You must be signed in to change notification settings - Fork 90
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
Can't construct struct with named field #400
Comments
Thanks for the report! |
So I think the issue lies in try_lookup_meta. It forgets to add the meta to the All that's needed is to include that extra line, like we do in the self.unit.insert_meta(location.as_spanned(), &meta, self.pool, self.inner)?;
self.insert_meta(meta.clone()).with_span(location.as_spanned())?; Then something like this will work fine: pub fn main() {
let external = External {
first: 1,
second: "two",
};
external
} But this fails if you want to extract the value from the VM: let output = vm.call(["main"], ())?;
let output: External = rune::from_value(output)?;
println!("{:?}", output);
Because the To get an actual |
Hi,
I can't construct struct like this:
its will cause an error:
I know I must be doing something wrong, but I don't know how to debug and fix it.
Here is my rune code
The text was updated successfully, but these errors were encountered: