windjammer 0.48.0

A simple language inspired by Go, Ruby, and Elixir that transpiles to Rust - 80% of Rust's power with 20% of the complexity
Documentation
#![cfg(not(any(
    feature = "parser_tests",
    feature = "analyzer_tests",
    feature = "codegen_tests",
    feature = "interpreter_tests",
    feature = "conformance_tests",
    feature = "integration_tests",
)))]

#[path = "common/test_utils.rs"]
mod test_utils;

/// Internal module fn taking borrowed `string` must receive `&owned_string` at call sites.
#[test]
fn test_internal_module_call_borrows_string_arg() {
    let source = r#"
pub fn load_shader(path: string) -> u32 {
    0
}

pub fn build() -> u32 {
    let shader_path = "foo.wjsl".to_string()
    load_shader(shader_path)
}
"#;

    let generated = test_utils::compile_single(source);
    println!("Generated:\n{}", generated);

    assert!(
        generated.contains("load_shader(&shader_path)")
            || generated.contains("load_shader(& shader_path)"),
        "owned String local should be borrowed for &str param. Got:\n{}",
        generated
    );
}