Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
latest
What command(s) is the bug in?
forge flatten
Operating System
macOS (M1)
Describe the bug
the as keyword, used to remap imports like
import {FixedPointMath as Math} from "..."
Math.mul()
is ignored by forge flatten, which just indiscriminately pastes FixedPointMath in and fails to rename/alias it to Math
this results in the output of forge flatten failing to compile because the compiler does not know what Math is if FixedPointMath is not alias'd/renamed, while the input could be a perfectly valid contract like above
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
latest
What command(s) is the bug in?
forge flatten
Operating System
macOS (M1)
Describe the bug
the
askeyword, used to remap imports likeis ignored by
forge flatten, which just indiscriminately pastesFixedPointMathin and fails to rename/alias it toMaththis results in the output of
forge flattenfailing to compile because the compiler does not know whatMathis ifFixedPointMathis not alias'd/renamed, while the input could be a perfectly valid contract like above