Skip to content

InternalsVisibleTo attribute in recursive module not compiles #3511

Description

@Dolfik1

InternalsVisibleTo attribute not compiles in recursive module

Repro steps

Provide the steps required to reproduce the problem

  1. Paste the following:
module rec Test

open System.Runtime.CompilerServices

[<assembly: InternalsVisibleTo("System")>]
do()
  1. Try to compile

Expected behavior

No compile errors.

Actual behavior

Error FS0039 The type 'InternalsVisibleTo' is not defined.

Known workarounds

Use a fully qualified name:

module rec Test

[<assembly: System.Runtime.CompilerServices.InternalsVisibleTo("System")>]
do()

Related information

Bug reproduced in F# 4.1 Compiler

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

    Type

    No type

    Projects

    Status
    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions