Skip to main content

nanvm_harness/gen.fixtures/
string_from_char_code_coercion_throws.rs

1// @generated by `fjs compile`. Do not edit: recompile the source module instead.
2
3use nanvm_lib::vm::unstable::{f64_any, static_read, string_any, string_key};
4use nanvm_lib::vm::{Any, IStaticFunction, ToAny, ToArray, ToObject};
5
6#[rustfmt::skip]
7#[allow(clippy::if_same_then_else)]
8pub fn module<A: IStaticFunction>(runtime: Any<A>) -> Result<Any<A>, Any<A>> {
9    let _b0: Any<A> = (static_read(&runtime, "String.fromCharCode"))?;
10    Ok([(string_key("default"), (Any::call(_b0.clone(), [f64_any(0x4050400000000000), [(string_key("valueOf"), A::static_function(|_self, _args| { Err(string_any("first")) }, 0, [runtime.clone()].to_array(), Some("()=>{throw \"first\";}")).to_any())].to_object().to_any(), [(string_key("valueOf"), A::static_function(|_self, _args| { Err(string_any("second")) }, 0, [runtime.clone()].to_array(), Some("()=>{throw \"second\";}")).to_any())].to_object().to_any()].to_array().to_any()))?)].to_object().to_any())
11}