-
Notifications
You must be signed in to change notification settings - Fork 854
Open
Labels
Area-Compiler-SigFileGengeneration of signature files - both compiler and IDEgeneration of signature files - both compiler and IDEBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone
Description
When generating a signature file from an attribute that uses a literal, the generated code will have the constant value instead of the literal.
Repro steps
module Maybe
open System.ComponentModel
[<Literal>]
let A = "A"
module SubModule =
type Foo() =
[<Category(A)>]
member this.Meh () = ()leads to
module Maybe
[<Literal>]
val A: string = "A"
module SubModule =
type Foo =
new: unit -> Foo
[<System.ComponentModel.Category ("A")>]
member Meh: unit -> unitExpected behaviour
The generated signature should be considered equivalent to the backing source file.
Actual behaviour
The generated code is using a hardcoded string "A" instead of the defined literal A.
Known workarounds
Edit signature file by hand.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area-Compiler-SigFileGengeneration of signature files - both compiler and IDEgeneration of signature files - both compiler and IDEBugImpact-Medium(Internal MS Team use only) Describes an issue with moderate impact on existing code.(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Type
Projects
Status
New