Skip to content

decompile not producing correct output in generic method calls #125

Description

@eiriktsarpalis

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()"

Activity

  1. stephen-swensen commented on Jun 16, 2016

    @stephen-swensen
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions