-
Notifications
You must be signed in to change notification settings - Fork 838
Closed
Labels
Area-Compiler-PatternMatchingpattern compilation, active patterns, performance, codegenpattern compilation, active patterns, performance, codegenBugImpact-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
Pattern matching warnings seem to get confused by covering active patterns.
Repro steps
Code:
type Cond = Foo | Bar | Baz
let (|SetV|) x _ = x
[<EntryPoint>]
let main argv =
let c = Cond.Foo
match c with
| Baz ->
printfn "Baz"
| Foo & SetV "and" kwd
| Bar & SetV "or" kwd ->
printfn "Keyword: %s" kwd
| Baz -> failwith "wat"
0 // return an integer exit codeExpected behavior
Dropping the last case, it would compile with no warnings.
Actual behavior
It complains about a missing case, then even when you add it, it says it will never match.
Related information
Windows 10, Visual Studio 2015, power tools installed
Metadata
Metadata
Assignees
Labels
Area-Compiler-PatternMatchingpattern compilation, active patterns, performance, codegenpattern compilation, active patterns, performance, codegenBugImpact-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
Done
