Wrong confusing warning FS1189 when using SRTP with active patterns #7797
Labels
Area-Compiler-Syntax
lexfilter, indentation and parsing
Bug
Impact-Low
(Internal MS Team use only) Describes an issue with limited impact on existing code.
Milestone
This is fine:
But this is not:
Note: the code above does not require an explicit SRTP, but I just wanted to keep it simple. The actual example came from my comment here: fsharp/fslang-suggestions#661 (comment)
It can be seen with any SRTP type constraint, the full warning being:
Known workarounds
Ignore the warning (but that will ignore it for the whole file).
Other info
It has been reported before, but writing
<^t
instead of< ^t
will yield a syntax error. Though I doubt that is the space the compiler complains about.Also: the actual warning doesn't seem tailored for SRTP, it shows examples for normal type constraints, which can be confusing.
The text was updated successfully, but these errors were encountered: