Skip to content

Compiler incorrectly whines about redefinition of procs that take different instances. #686

@BitPuffin

Description

@BitPuffin
type TType[T; A] = array[A, T]

proc foo[T](p: TType[T, range[0..1]]) =
  echo "foo"
proc foo[T](p: TType[T, range[0..2]]) =
  echo "bar"

As a human can see, the two foo's take different parameters. But the lovely little git known as the compiler thinks they are identical, and spits out:

poop.nim(5, 0) Error: redefinition of 'foo'

So let's fix it.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions