E4031

E4031#

The constructor is not found.

Erroneous Example#

enum U { V }
let v : U = W

The example above tries to assign a variant W to a variable v of type U, but this variant doesn't exist, giving the following error on line 2:

The variant type U does not have the constructor W.

Suggestion#

Make sure to use the correct constructor instead:

enum U { V }
let v : U = V