You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fancy f# method names with `` `` are escaping according to some rules, and to make managed name full compatible we need to fully unescape. #4969 fixes the most painful problem that prevents discovering completely. But in ideal case the CIL name should be fully unescaped so it can be found through reflection.
I have run a few manual tests and here are the characters that gets transformed (not exhaustive list):
Any sequence of characters that is enclosed in double-backtick marks (), excluding newlines,
tabs, and double-backtick pairs themselves, is treated as an identifier. Note that when an identifier is
used for the name of a types, union type case, module, or namespace, the following characters are
not allowed even inside double-backtick marks:
‘.', '+', '$', '&', '[', ']', '/', '\', '*', '"', '`'
All input files are currently assumed to be encoded as UTF-8. See the C# specification for a list of the
Unicode characters that are accepted for the Unicode character classes \Lu, \Li, \Lt, \Lm, \Lo, \Nl,
\Pc, \Mn, \Mc, and \Cf.
member this.`` . + - = $ & [ ] \ / * @ ' ` " % ( ) ^ `` () =
Experimenting with the chars above and few more only ` ' " \ look to be escaped for methods:
Activity
testplatform-bot commentedon Apr 9, 2024
✅ Successfully linked to Azure Boards work item(s):
nohwnd commentedon Apr 9, 2024
Spec says:
3.4 Identifiers and Keywords
Any sequence of characters that is enclosed in double-backtick marks (
), excluding newlines,tabs, and double-backtick pairs themselves, is treated as an identifier. Note that when an identifier is
used for the name of a types, union type case, module, or namespace, the following characters are
not allowed even inside double-backtick marks:
‘.', '+', '$', '&', '[', ']', '/', '\', '*', '"', '`'
All input files are currently assumed to be encoded as UTF-8. See the C# specification for a list of the
Unicode characters that are accepted for the Unicode character classes \Lu, \Li, \Lt, \Lm, \Lo, \Nl,
\Pc, \Mn, \Mc, and \Cf.
https://fsharp.org/specs/language-spec/4.1/[FSharpSpec-4.1-latest.pdf](https://fsharp.org/specs/language-spec/4.1/FSharpSpec-4.1-latest.pdf)
member this.`` . + - = $ & [ ] \ / * @ ' ` " % ( ) ^ `` () =Experimenting with the chars above and few more only
` ' " \look to be escaped for methods:Amaury Bouchard (@Amaury) how did you get @ to become Yuriy Semchyshyn (@5)?
Amaury commentedon Apr 9, 2024
Not the right Amaury... Try again 😉
nohwnd commentedon Apr 11, 2024
This is not an issue, I misinterpreted what the parser is doing. We only need to handle ' correctly, which we do in #4969
Add regression tests for untested bug fixes
Add 365 regression tests for untested bug fixes (#15615)