-
Notifications
You must be signed in to change notification settings - Fork 832
Description
While updating FsAutoComplete to support F# 7 I found that something fundamental has changed in the way at least anonymous modules are parsed in the presence of errors. This leads to a large number of parse-tree-based helper methods for powering codefixes no longer functioning, and so many of the tests FSAC has validating codefix behavior are now permanently broken. For the codefixes I've directly investigated that have parallels in the VS tooling in this repo, I saw the same behavior using a VS 17.5 preview (to ensure I was on a similar FCS). Let's dig into one CodeFix in particular - the one that converts erroring single-quote string interpolation into triple-quoted interpolation.
Repro steps
Provide the steps required to reproduce the problem:
- Load up an .fsx file with the following content:
let a = $":^) {if true then "y" else "n"} d" - Note that a diagnostic 3373 is triggered at the " next to the
y. - Attempt to fire a codefix - none is found.
- The code that should trigger the codefix is
TryRangeOfStringInterpolationContainingPos TryRangeOfStringInterpolationContainingPosisn't finding an interpolated string expression, why?- There are no
declsin theSynModuleOrNamespace:

This is the case for many other codefixes, and they present the same way in VS as well.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status