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

Comments

Projects
None yet
3 participants
@0x53A
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

This comment has been minimized.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment