I suggest we ...

Allow upcast in type test pattern (inside computation expression)

See this SO subject along with Tomas response ; that convey pretty well what i mean (as my english is rubbish).

http://stackoverflow.com/questions/33585508/why-this-for-type-test-pattern-fails

1 vote
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Sehnsucht shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      Submitting...
      • Don Syme commented  ·   ·  Flag as inappropriate

        Perhaps I don't fully understand the suggestion. However essentially we decided against this in the design of computation expressions, instead the recommendation is to use "match" if doing a runtime type test, and ":>" if doing a static cast.

      F# Language

      Feedback and Knowledge Base