Github Regression on SDK 5.0.300: When using an identifier like __SOURCE_DIRECTO...
source link: https://github.com/dotnet/fsharp/issues/11610
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Copy link
da9l commented 5 days ago
Please provide a succinct description of the issue.
When using SDK 5.0.300 and one uses an identifier in a type parameter one get a FS3045 compilation error.
It works on SDK 5.0.203
Provide the steps required to reproduce the problem:
- Use SDK 5.0.300
- Compile the code below, also see FS3045 error reproduction repro
open System open FSharp.Data type Sample = XmlProvider<Schema="Sample.xsd", ResolutionFolder=__SOURCE_DIRECTORY__>
Expected behavior
It should work as it does in SDK 5.0.203.
Actual behavior
A FS3045 compilation error.
Known workarounds
- Use SDK 5.0.203
- Put the identifier into a
[<Literal>]
value.
[<Literal>] let refDir = __SOURCE_DIRECTORY__ type Sample = XmlProvider<Schema="Sample.xsd", ResolutionFolder=refDir>
Provide any related information (optional):
- Operating system: Windows 10
- .NET Runtime kind (.NET Core, .NET Framework, Mono): dotnet-sdk 5.0.300
- Editing Tools (e.g. Visual Studio Version, Visual Studio): Visual Studio Code (probably not related)
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK