E4000

E4000#

Generic type variable name is already used.

Erroneous example#

struct Container[T, T] {
  value : T
}

fn transform[A, A](x : A) -> A {
  x
}

Suggestion#

Use different names for type variables:

struct Container[T1, T2] {
  value : T1
}

fn transform[A, B](x : A) -> B {
  // ... implementation
}

Or remove the duplicate type parameter if you meant to use the same type:

struct Container[T] {
  value : T
}

fn transform[A](x : A) -> A {
  x
}