Statement to program mode conversion fail with #load

With a query having a #load at the top and in statement mode, if I press Ctrl-3 to convert to program mode, only the .Dump statements were moved into the main() method and the rest of the statements and declarations left after main().

Comments

  • NetMage
    edited July 2020

    Just tried it with a different query without #load and had the same issue, so it just seems like statement to program conversion no longer reliably moves the statements into the body of main.

    I also don't get the comment about adding other objects after main when this happens.

  • Can you give an example? What version of LINQPad you running?

  • I am running the beta update stream 6.10.2 x64. My Query Preferences are set to C# Statement(s) mode.

    I type in var test = new[] { new { ID = 1 }, }; then hit return. I press Ctrl-3 and see Main() added with my statement outside of Main.

  • Thanks - this should be fixed in 6.10.4. Let me know if you are still having issues.

  • So far it appears to be working fine.

    Thanks!