You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| F# 4.1 | FS-1009 |[Mutually Referential Types and Modules in Single Scope](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1009-mutually-referential-types-and-modules-single-scope.md)||
23
23
| F# 4.1 | FS-1010 |[Add Map.count](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1010-add-map-count.md)| This specifies some details of the `FSharp.Core` library, which is not part of this spec (except for the basic items listed in [§18](https://fsharp.github.io/fslang-spec/the-f-library-fsharpcoredll/)) |
24
-
| F# 4.1 | FS-1012 |[Caller Info Attributes](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1012-caller-info-attributes.md)||
24
+
| F# 4.1 | FS-1012 |[Caller Info Attributes](https://github.com/fsharp/fslang-design/tree/main/FSharp-4.1/FS-1012-caller-info-attributes.md)|[completed](https://github.com/fsharp/fslang-spec/pull/74)|
Copy file name to clipboardExpand all lines: spec/special-attributes-and-types.md
+6-3Lines changed: 6 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
This chapter describes attributes and types that have special significance to the F# compiler.
4
4
5
-
## Custom Attributes Recognized by F#.
5
+
## Custom Attributes Recognized by F\#
6
6
7
7
The following custom attributes have special meanings recognized by the F# compiler. Except where
8
8
indicated, the attributes may be used in F# code, in referenced assemblies authored in F#, or in
@@ -26,6 +26,9 @@ assemblies that are authored in other CLI languages.
26
26
| System.Reflection.AssemblyProductAttribute <br> `[<AssemblyProduct(...)>]`| Attaches product name metadata to the compiled form of the assembly, such as the “ProductName” attribute in the Win32 version resource for the assembly. <br>This attribute may be used in both F# and imported assemblies. |
27
27
| System.Reflection.AssemblyKeyFileAttribute <br> `[<AssemblyKeyFile(...)>]`| Indicates to the F# compiler how to sign an assembly. <br>This attribute may be used in both F# and imported assemblies. |
28
28
| System.Reflection.DefaultMemberAttribute <br> `[<DefaultMember(...)>]`| When applied to a type, specifies the name of the indexer property for that type. <br>This attribute may be used in both F# and imported assemblies. |
29
+
| System.Runtime.CompilerServices.CallerFilePathAttribute `[<CallerFilePath>]`| A string optional argument with this attribute will be given a runtime value matching the absolute file path of source of the callsite. <br>This attribute may be used in both F# and imported assemblies. |
30
+
| System.Runtime.CompilerServices.CallerLineNumberAttribute `[<CallerLineNumber>]`| An integer optional argument with this attribute will be given a runtime value matching the line number of the source of the callsite. <br>This attribute may be used in both F# and imported assemblies. |
31
+
| System.Runtime.CompilerServices.CallerMemberNameAttribute `[<CallerMemberName>]`| A string optional argument with this attribute will be given a runtime value matching the unqualified name of the enclosing member of the callsite. <br>This attribute may be used in both F# and imported assemblies. |
29
32
| System.Runtime.CompilerServices.InternalsVisibleToAttribute `[<InternalsVisibleTo(...)>]`| Directs the F# compiler to permit access to the internals of the assembly. <br>This attribute may be used in both F# and imported assemblies. |
30
33
| System.Runtime.CompilerServices.TypeForwardedToAttribute `[<TypeForwardedTo(...)>]`| Indicates a type redirection. <br>This attribute may be used only in imported non-F# assemblies. It is not permitted in F# code. |
31
34
| System.Runtime.CompilerServices.ExtensionAttribute <br> `[<Extension(...)>]`| Indicates the compiled form of a C# extension member. <br>This attribute may be used only in imported non-F# assemblies. It is not permitted in F# code. |
@@ -64,7 +67,7 @@ assemblies that are authored in other CLI languages.
64
67
| FSharp.Core.TypeProviderXmlDocAttribute | Specifies documentation for provided type definitions and provided members |
65
68
| FSharp.Core.TypeProviderDefinitionLocationAttribute | Specifies location information for provided type definitions and provided members |
66
69
67
-
## Custom Attributes Emitted by F#.
70
+
## Custom Attributes Emitted by F\#
68
71
69
72
The F# compiler can emit the following custom attributes:
70
73
@@ -81,7 +84,7 @@ The F# compiler can emit the following custom attributes:
81
84
| FSharp.Core.FSharpInterfaceDataVersionAttribute | Defines the schema number for the embedded binary resource for F#-specific interface and optimization data. |
82
85
| FSharp.Core.OptionalArgumentAttribute | Indicates optional arguments to F# members. |
83
86
84
-
## Custom Attributes not Recognized by F#.
87
+
## Custom Attributes not Recognized by F\#
85
88
86
89
The following custom attributes are defined in some CLI implementations and may appear to be
87
90
relevant to F#. However, they either do not affect the behavior of the F# compiler, or result in an
0 commit comments