Code using records causes multiemit warning
See original GitHub issueThe following two interactions in F# Interactive cause a multi-emit warning: Run:
artifacts\bin\fsi\Release\net472\fsi.exe --multiemit
then
type Test = { A: int; B: string };;
then
let list = [{ A = 1; B = "a" }; { A = 2; B = "b" }; { A = 3; B = "c" }]
[ for x in list do x.A ]
;;
Gives:
stdin(3,1): warning FS2303: Accessing the internal type, method or field 'A@' from a previous evaluation in F# Interactive is deprecated and may cause subsequent access errors. To enable the legacy generation of a single dynamic assembly that can access internals, use the '--multiemit-' option.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Records with different fields for its constructors can cause a ...
Problem with warning is that if you know which constructor you have by pattern matching then you would receive false warning: f x@(ExecFail ......
Read more >Use C# 9 records and init-only properties in ReSharper ...
Because init-only properties are immutable by default, they are only mutable in the constructor and initializer. A quick-fix makes it easy to ...
Read more >C# 9.0 on the record - .NET Blog
It is an error to call them from anywhere outside of the top level statement section. Improved pattern matching. Several new kinds of...
Read more >How to make multiple versions of the same record, with F# ...
So I would like to figure out if there is a way to make a record I can extend but that contains a...
Read more >Send different status codes with payload
REST service - Send different status codes with payload. The resource method can return a subtype of the http:StatusCodeResponse record type with a...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Here: This is what we currently ship:
This includes my fix: note the deprecation warning has gone away, as has the 30 execution limits
Thanks @KevinRansom , but actually I’ve realised that this initial bug report talked about records while I discovered it when using DUs; so I should have posted my comment in this other bug: https://github.com/dotnet/fsharp/issues/14216 (which now you might want to mark as closed).