Compiler panics when duplicate enum declarations exists in library
bitzoic opened this issue · comments
Cameron Carstens commented
In the following example we have this project structure:
project/
├── src/
| ├── main.sw
│ └──lib.sw
└── Forc.toml
Our library lib.sw
has a definition for MyEnum
:
library;
pub enum MyEnum {
variant1: b256,
variant2: u64,
}
Our contract redefines MyEnum
and imports the library:
contract;
mod lib;
use lib::*;
pub enum MyEnum {
variant1: b256,
variant2: u64,
}
This results in the following error:
Tested using forc v0.56.0