Closed
Description
Component
Forge
Have you ensured that all of these are up to date?
- Foundry
- Foundryup
What version of Foundry are you on?
forge 0.2.0 (dffdfde 2023-08-14T00:22:15.788827000Z)
What command(s) is the bug in?
forge fmt
Operating System
macOS (Apple Silicon)
Describe the bug
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ERC1155} from "solmate/tokens/ERC1155.sol";
import {IAchievements} from "./interfaces/IAchievements.sol";
import {SoulBound1155} from "./abstracts/SoulBound1155.sol";
contract Achievements is IAchievements, SoulBound1155, Ownable {
constructor(address owner) Ownable() ERC1155() {}
}
While formatting this piece of code with forge fmt
, it removes parentheses for ERC1155
inline derived constructor call. Then, the compiler gives such an error on forge build
:
vladikopl@Vladichek-Air core % forge build
[⠊] Compiling...
[⠢] Compiling 1 files with 0.8.20
[⠆] Solc 0.8.20 finished in 18.36ms
Error:
Compiler run failed:
Error (1563): Modifier-style base constructor call without arguments.
--> contracts/Achievements.sol:17:42:
|
17 | constructor(address owner) Ownable() ERC1155 {}
| ^^^^^^^
May it be caused by SoulBound1155
contract as it is already derived from ERC1155
? Anyways, I think formatter should recognise it, and not change ERC1155()
to ERC1155
Metadata
Metadata
Assignees
Type
Projects
Status
Done