mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-23 01:31:34 +00:00
Fix imported usage of wasm_bindgen
macro
Make sure it refers to `__wasm_bindgen_class_marker` via an absolute path! Closes #1422
This commit is contained in:
@ -459,3 +459,21 @@ pub fn option_class_assert_none(x: Option<OptionClass>) {
|
||||
pub fn option_class_assert_some(x: Option<OptionClass>) {
|
||||
assert_eq!(x.unwrap().0, 3);
|
||||
}
|
||||
|
||||
mod works_in_module {
|
||||
use wasm_bindgen::prelude::wasm_bindgen;
|
||||
|
||||
#[wasm_bindgen]
|
||||
pub struct WorksInModule(u32);
|
||||
|
||||
#[wasm_bindgen]
|
||||
impl WorksInModule {
|
||||
#[wasm_bindgen(constructor)]
|
||||
pub fn new() -> WorksInModule {
|
||||
WorksInModule(1)
|
||||
}
|
||||
|
||||
pub fn foo(&self) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user