Skip to content
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

Spurious FS3220 when using an extension method for a tuple #4386

Closed
0x53A opened this issue Feb 23, 2018 · 1 comment
Closed

Spurious FS3220 when using an extension method for a tuple #4386

0x53A opened this issue Feb 23, 2018 · 1 comment
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Ready
Milestone

Comments

@0x53A
Copy link
Contributor

0x53A commented Feb 23, 2018

open System.Runtime.CompilerServices

[<Extension>]
type TupleEx() =
    [<Extension>]
    static member inline Do((x,y): (int*string)) = ()
    
let x = 1, "2"

x.Do()
// ^  warning FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead.

- or even simpler -

open System

let vt = struct(1,"2")
let t = vt.ToTuple()
//      ^ warning FS3220: This method or property is not normally used from F# code, use an explicit tuple pattern for deconstruction instead.
@dsyme
Copy link
Contributor

dsyme commented Feb 23, 2018

Agreed that neither of these should give warnings. For now suppress the warning. Fix is in #4386

@cartermp cartermp added this to the 15.7 milestone Feb 23, 2018
@dsyme dsyme added Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Ready labels Feb 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Impact-Medium (Internal MS Team use only) Describes an issue with moderate impact on existing code. Ready
Projects
None yet
Development

No branches or pull requests

3 participants