Here is a minimal reproduction example:
And here is the code generated, as shown in ILSpy
For further reference, here is a screenshot of what happens when trying to evaluate in fsi:
The issue seems to go away when I add an explicit annotation to the
argument in the
constructor. Not sure whether this is a typecheck or codegen issue, type checker does complain if I change
into an explicit member method.