-
Notifications
You must be signed in to change notification settings - Fork 77
[Rename Refactoring] Rename doesn't work correctly with Active Patterns #77
Comments
Yes, again this is an FCS bug/limitation. Please report upstream, and ideally add a failing test case to FCS |
The underlying problem is fixed in FCS 0.0.26. However your mileage may vary, particularly when renaming within an active pattern definition Renaming at other locations should work OK |
Have you tried the failing tests in fsharp/fsharp-compiler-docs#62? It's the way I fancy it (renaming only individual identifiers). |
Yes, the added tests were great ad pass (not the exception ones). A modified copy of them was included. |
@dsyme Is there any easy to check whether a symbol is active pattern? https://github.com/fsharp/FSharp.Compiler.Service/blob/master/src/fsharp/vs/Typed.fs#L758 doesn't seem to help. |
That property should work for an active pattern function But I think you want to test whether a symbol is an active pattern label (like Also there is no way to retrieve the FSharpActivePatternLabels for a active pattern function. We should add that. Add an FCS issue, thanks |
Example:
Renaming the use of
Float
toFloat2
resulting:that doesn't compile.
Additionally:
float2
)Float
in(|Float|_|)
This might include a bug in FSharp.Compiler.Service which should be reported upstream.
The text was updated successfully, but these errors were encountered: