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

We should avoid forwarding method to LibCall without checking the name #3767

Open
MangelMaxime opened this issue Feb 23, 2024 · 0 comments
Open

Comments

@MangelMaxime
Copy link
Member

Description

In several places of the replacement phase, we do something like that:

| meth ->
let args = ignoreFormatProvider meth args
let meth = Naming.removeGetSetPrefix meth |> Naming.lowerFirst
Helper.LibCall(com, moduleName, meth, t, args, i.SignatureArgTypes, ?thisArg = thisArg, ?loc = r)
|> Some

This is problematic because if an API is not supported Fable will still compiled but the code will fails at runtime as the import cannot be full-filed.

We should always check that the API we are forwarded is supported by Fable, like that if it is not supported Fable will fails the compilation/display warning about not all BCL API being supported.

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

No branches or pull requests

1 participant