Skip to content

Latest commit

 

History

History
29 lines (20 loc) · 455 Bytes

5002.md

File metadata and controls

29 lines (20 loc) · 455 Bytes

5002

There was a duplicate of something.

This may occur when using and to declare many things at once.

val x = 3
and x = 4
(** ^ duplicate value: `x` *)

It may also occur when binding the same name more than once in a pattern.

fun add (x, x) = x + x
(**         ^ duplicate value: `x` *)

To fix

Use different names, or avoid and. (The latter induces shadowing.)

val x = 3
val x = 4