Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (084ef3d 2022-09-19T00:04:35.98318Z)
What command(s) is the bug in?
forge flatten
Operating System
macOS (Apple Silicon)
Describe the bug
If I have a contract using a named import of an interface, such as
import { IERC20 as MyIERC20 } from "src/interfaces/IERC20.sol";
forge flatten on that file results in output that includes the IERC20 interface, and the contract using the named import. Since the contract uses the named import MyIERC20, and the flattened file includes interface IERC20 but not interface MyIERC20, forge build fails with DeclarationError: Identifier not found or not unique.
This seems related to #1440
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (084ef3d 2022-09-19T00:04:35.98318Z)
What command(s) is the bug in?
forge flatten
Operating System
macOS (Apple Silicon)
Describe the bug
If I have a contract using a named import of an interface, such as
forge flattenon that file results in output that includes the IERC20 interface, and the contract using the named import. Since the contract uses the named importMyIERC20, and the flattened file includesinterface IERC20but notinterface MyIERC20,forge buildfails withDeclarationError: Identifier not found or not unique.This seems related to #1440