-
Notifications
You must be signed in to change notification settings - Fork 774
New issue
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
F# Interactive v14 backward incompatibility: Error FS0193 when calling inlined Array.init #486
Comments
@gbaydin - thank you for this timely bug report. This commit broke the binary compatibility of FSharp.Core: 52a7252 because the "module let" bindings were changed to "static member" bindings, and as far as F# metadata is concerned these are different. This obviously needs to be fixed for FSharp.Core 4.4.0.0. These items are referred to in the inlined implementations of Array.init and other functions. |
that commit was mine, so i think i should help 😄 , i'll fix this Possible fix:
But @dsyme can you help me to understand better the problem? The root problem i think is: That's ok, we can inline some functions, but not others unless we wrap the The problem is: Maybe is already discussed before but cant we make a wrapper of FSharp.Core.SR.resources public instead? And use inlined functions for type safety access of resource strings? module internal SR =
//public wrapper
let resourceManager: ResuorceManager = resources
module internal Resources =
let inline GetString(name:System.String) : System.String =
SR.resourceManager.GetString(name, System.Globalization.CultureInfo.CurrentUICulture)
let inline arrayWasEmpty () = GetString(SR.arrayWasEmpty)
inside the code we can do Another options is to use a |
Hi. I have Visual Studio Community 2013 Update 4 and 2015 RC on my system. While I was experimenting with F# 4.0, I encountered a problem with the new F# Interactive (v14.0.22810.0).
I did my best to isolate the problem into a minimal example. Here are the steps to reproduce:
targeting FSharp.Core 4.3.1.0.
Test.init1
and run it within F# Interactive 14.0.22810.0.
You get:
whereas if you run it with F# Interactive 12.0.30815.0 it runs fine:
Here is some extra information:
If you call
Test.init2
, which has the same type withTest.init1
, with F# Interactive 14.0.22810.0, there is no error and it runs fine. So, there is something to do withinline
.When you call
Test.init1
from an F# console applicationthere is no error. So, the error is about F# Interactive.
The text was updated successfully, but these errors were encountered: