Skip to content

No duplicate error on impl function without self #7483

@asterite

Description

@asterite

Aim

Given this code:

pub struct Foo {}

impl Foo {
    fn foo() {}
    fn foo() {}
}

fn main() {}

Expected Behavior

It should give an error saying that "foo" was already defined.

Bug

It doesn't give an error.

Note that if it's fn foo(self) then an error is produced, so this is exclusively to functions without a self.

To Reproduce

Workaround

None

Workaround Description

No response

Additional Context

No response

Project Impact

None

Blocker Context

No response

Nargo Version

No response

NoirJS Version

No response

Proving Backend Tooling & Version

No response

Would you like to submit a PR for this Issue?

None

Support Needs

No response

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions