-
Notifications
You must be signed in to change notification settings - Fork 825
Open
Open
Copy link
Labels
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingType checking, attributes and all aspects of logic checkingBugImpact-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.
Milestone
Description
Take the following example. Compiled with <OtherFlags>$(OtherFlags) --warnon:3395</OtherFlags>
it produces no warnings on the constructor.
open System
// Minimized copy for demonstration of Microsoft.Extensions.Primitives.StringValues
type StringValues(v: string) =
static member op_Implicit(values: StringValues): string = ""
type Foo(_v: Nullable<int>) =
member val Test: Nullable<int> = 0 with get,set // Warning for 3391 as I would have interpreted it.
member val StringValue: string = "" with get,set
static member Create() =
let value = 1
let instance = Foo(value, Test = value) // No warning on either the argument or the property setter?
instance.Test <- value // No warning for 3395 and 3391?
instance.StringValue <- StringValues("1") // Warning for 3395
let mutable test: Nullable<int> = value // Warning for 3391 as I would have interpreted it.
// Warning for 3391 but it's syntactically identical to the line that had no warning and one that had 3395???
test <- 1
Metadata
Metadata
Assignees
Labels
Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingType checking, attributes and all aspects of logic checkingBugImpact-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.
Type
Projects
Status
New