Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Anonymous interface implementation accessibility when tuple deconstruction is used. #802

Closed

Description

@FrankBro

Anonymous interface implementation accessibility when tuple deconstruction is used

Repro steps

module private PM = 
    type PT = 
        abstract A : int
    let a = { new PT with member __.A = 1 } // ok
    let b, c = // PT is less accessible than PT * PT
        { new PT with member __.A = 1 }
        , { new PT with member __.A = 1 }
/home/runner/main.fs(5,9): error FS0410: The type 'PT' is less accessible than the value, member or type 'val patternInput : PM.PT * PM.PT' it is used in

/home/runner/main.fs(5,9): error FS0410: The type 'PT' is less accessible than the value, member or type 'val patternInput : PM.PT * PM.PT' it is used in

Expected behavior

Should work just like a does.

Actual behavior

Compile error

Known workarounds

Construct the tuple after implementing the anonymous interfaces

Related information

Repro'd here: https://repl.it/repls/FavorableDarkturquoiseGordonsetter

Activity

  1. changed the title [-]Anonymous interface implementation accessibility when tupled.[/-] [+]Anonymous interface implementation accessibility when tuple deconstruction is used.[/+] on Dec 11, 2017
  2. enricosada commented on Dec 22, 2017

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions