Closed
Description
Hello everybody!
I'm getting the next error wehen trying to compile an enum
with an impl
error: cannot shadow already defined class 'Foo' Error: Running the wasm-bindgen CLI Caused by: Running the wasm-bindgen CLI Caused by: failed to execute 'wasm-bindgen': exited with exit status: 1
like this:
use wasm_bindgen::prelude::*;
#[wasm_bindgen]
pub enum Foo {
A,
B
}
#[wasm_bindgen]
impl Foo {
pub fn from(f: usize) -> Option<Foo> {
match f {
0 => Some(Foo::A),
1 => Some(Foo::B),
_ => None
}
}
}
wasm-pack version: 0.11.0
rustc version: 1.69.0
Regards!
Metadata
Metadata
Assignees
Labels
No labels