I suggest we ...

Record copy update should be able change the generic type

type A<'a> =
{
mutable x: 'a
}

let a = {x = 1}
{a with x="Hello"} // Type error

Since the x field is generic and F# is type safe, it would not be bad if the above was valid.

1 vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Marko Grdinic shared this idea  ·   ·  Admin →

    0 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...

      F# Language

      Feedback and Knowledge Base