mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-26 19:21:35 +00:00
@ -367,8 +367,6 @@ fn pass_into_js_as_js_class() {
|
||||
.test();
|
||||
}
|
||||
|
||||
|
||||
|
||||
#[test]
|
||||
fn constructors() {
|
||||
project()
|
||||
@ -445,3 +443,33 @@ fn constructors() {
|
||||
"#)
|
||||
.test();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn empty_structs() {
|
||||
project()
|
||||
.debug(false)
|
||||
.file("src/lib.rs", r#"
|
||||
#![feature(proc_macro, wasm_custom_section, wasm_import_module)]
|
||||
|
||||
extern crate wasm_bindgen;
|
||||
|
||||
use wasm_bindgen::prelude::*;
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub struct MissingClass {}
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub struct Other {}
|
||||
|
||||
#[wasm_bindgen]
|
||||
impl Other { pub fn return_a_value() -> MissingClass { MissingClass {} } }
|
||||
"#)
|
||||
.file("test.ts", r#"
|
||||
import { Other } from "./out";
|
||||
|
||||
export function test() {
|
||||
Other.return_a_value();
|
||||
}
|
||||
"#)
|
||||
.test();
|
||||
}
|
||||
|
Reference in New Issue
Block a user