We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With FSharp.Core 4.5+, the byref type has 2 generic arguments internally. This is breaking the behavior of .IsByRef property.
byref
.IsByRef
Use ParseAndCheckProject on a project containing byref type usage, and use .IsByRef on an FSharpEntity for it.
ParseAndCheckProject
FSharpEntity
Returns true.
true
Returns false.
false
Use x.IsByRef || x.CompiledName = "byref`2".
x.IsByRef || x.CompiledName = "byref`2"
Using FSharp.Compiler.Service nuget version 25.0.1.
FSharp.Compiler.Service
25.0.1
The text was updated successfully, but these errors were encountered:
fix fsharp/fsharp-compiler-docs#876
af6625b
@Jand42 Proposed fix is here, please take a look dotnet/fsharp#5635
Sorry, something went wrong.
@dsyme Sorry, I haven't tested right now, but my guess would be that https://github.com/fsharp/FSharp.Compiler.Service/blob/e082581b1a4a6b71d4f55c3741679320bba3cfaf/src/fsharp/symbols/Symbols.fs#L476-L478 also needs to be changed to have
(tyconRefEq cenv.g cenv.g.byref_tcr entity || tyconRefEq cenv.g cenv.g.v_byref2_tcr entity)
because byref`2 is the underlying type for 4.5. Thanks.
byref`2
isByrefTyconRef covers that, though admittedly it also covers other cases: https://github.com/Microsoft/visualfsharp/blob/master/src/fsharp/TastOps.fs#L2938
dsyme/fsharp@87ebbac
No branches or pull requests
With FSharp.Core 4.5+, the
byref
type has 2 generic arguments internally. This is breaking the behavior of.IsByRef
property.Repro steps
Use
ParseAndCheckProject
on a project containingbyref
type usage, and use.IsByRef
on anFSharpEntity
for it.Expected behavior
Returns
true
.Actual behavior
Returns
false
.Known workarounds
Use
x.IsByRef || x.CompiledName = "byref`2"
.Related information
Using
FSharp.Compiler.Service
nuget version25.0.1
.The text was updated successfully, but these errors were encountered: