Skip to content

Conversation

0xrusowsky
Copy link
Contributor

@0xrusowsky 0xrusowsky commented Oct 16, 2025

Motivation

closes #12126

Solution

explicitly handle trailing comments between inherited base contracts.

i also realized that we were printing the layout after the inherited base contracts, which didn't align with https://docs.soliditylang.org/en/latest/grammar.html#a4.SolidityParser.contractDefinition, so i flipped the order

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@grandizzy grandizzy enabled auto-merge (squash) October 16, 2025 10:42
@grandizzy grandizzy merged commit 7db6e44 into master Oct 16, 2025
29 of 31 checks passed
@grandizzy grandizzy deleted the rusowsky/12126 branch October 16, 2025 10:57
@github-project-automation github-project-automation bot moved this to Done in Foundry Oct 16, 2025
grandizzy pushed a commit to grandizzy/foundry that referenced this pull request Oct 16, 2025
…12127)

* fix(fmt): account for ternary operators when estimating size

* fix(fmt): handle comments between inherited base contracts

* test: layout + base inheritance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug(fmt): lack of trailing cmnt support between base contracts

2 participants