Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #2089 #2090

Merged
merged 1 commit into from
Apr 20, 2020
Merged

Conversation

a1trl9
Copy link
Contributor

@a1trl9 a1trl9 commented Apr 18, 2020

Fix #2089.

The case provided there could be reduced to:

use wasm_bindgen::prelude::*;

#[wasm_bindgen(module = vscode)]
extern "C" {
    #[wasm_bindgen(js_namespace = window)]
    fn f1();
}

#[wasm_bindgen]
extern "C" {
    type window;

    #[wasm_bindgen(getter, static_method_of = window)]
    fn f2();
}

#[wasm_bindgen]
pub fn yoyo() {
    f1();
    window::f2();
}

Seems prestore_global_import_identifiers didn't exhaustively match all possible JsImport so that StructuralClassGetter doesn't work here.

A test added.

@alexcrichton alexcrichton merged commit 3c40492 into rustwasm:master Apr 20, 2020
@alexcrichton
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't import aliasing workspace in a module and a global getter
2 participants