-
Notifications
You must be signed in to change notification settings - Fork 831
Open
Labels
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.help wanted
Milestone
Description
When generating a signature file from a static member with a subtype constraint, the result is somewhat unexpected.
Repro steps
module Foo
type IProvider =
interface
end
type Tainted<'T> =
class
end
type ConstructB =
static member ComputeDefinitionLocationOfProvidedItem<'T when 'T :> IProvider>(p: Tainted<'T>) : obj option = Noneleads to
module Foo
type IProvider =
interface end
type Tainted<'T> =
class end
type ConstructB =
static member ComputeDefinitionLocationOfProvidedItem: p: Tainted<#IProvider> -> obj optionExpected behaviour
[<Class>] should be added to type ConstructB (otherwise it won't compile) and overall I was expecting:
[<Class>]
type ConstructB =
static member ComputeDefinitionLocationOfProvidedItem<'T when 'T :> IProvider> : p: Tainted<'T> -> obj optionActual behaviour
While the signature does compile, I do suspect it can lead to unexpected IL or influence the mvid in another way.
Related information
Detected via #14703
Metadata
Metadata
Assignees
Labels
Area-Compiler-CodeGenIlxGen, ilwrite and things at the backendIlxGen, ilwrite and things at the backendBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.(Internal MS Team use only) Describes an issue with limited impact on existing code.help wanted