Skip to content

Pattern DUCase _ matches DUCase #10204

@TysonMN

Description

@TysonMN

The following code compiles, but it expected that it would not compile.

type MyDU = DUCase
let asdf = function
  | DUCase _ -> ()

I thought the last line would have to omit the discard pattern, which would look like | DUCase -> ().

This behavior is the opposite of bug #9520.

I am using

  • version 16.7.5 of Visual Studio Enterprise 2019 and
  • version 3.1.402 (x64) of the .NET Core SDK.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions