Skip to content

Modules and User-Defined Types are Not being Checked for Duplicates or Ambiguity #806

Description

@InsertCreativityHere

Compiling these 2 Slice files together should cause a redefinition error:

module Test
interface A { B() }

and

module Test::A
struct B {}

Because writing Test::A is ambiguous. And in version 0.3.1, we were catching this.
The regression was introduced by #700, which fixed a suite of other bugs in our old redefinition checking logic, but that PR failed to consider the case where a module could conflict with a user-defined type.

We need to update our check to properly consider modules. Note that it's okay for modules to have the same name as other modules. That's just a "re-opening", not a "re-definition". This special handling of modules is what caused the bug to land.

Metadata

Metadata

Labels

slicecRelated to the 'slicec' crate

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions