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

decompile not producing correct output in generic method calls #125

Open
eiriktsarpalis opened this issue Jun 9, 2016 · 1 comment
Open

Comments

@eiriktsarpalis
Copy link
Contributor

Consider the code:

decompile <@ typeof<int> @>     // correct: "typeof<int>"
decompile <@ Unchecked.defaultof<int> @> // wrong: "Unchecked.defaultof"

and

type Foo<'T>() = class end
decompile <@ new Foo<int>() @> // correct: "new Bar<int>()"

type Bar =
    static member Bar<'T>() = Unchecked.defaultof<'T>

decompile <@ Bar.Bar<int> () @> // wrong: "Bar.Bar()"
@stephen-swensen
Copy link
Contributor

Thanks @eiriktsarpalis for reporting these issues with decompile! I will definitely look into them and see what improvements can be made. Please do note that decompile is a sort of "best effort" with trade-offs for readability vs. correctness. (whereas eval and reduce need to be rock-solid for correctness of test evaluations).

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

No branches or pull requests

2 participants