Yul sources are given id 1 instead of 0 in compiler output (inconsistent with source map & ast) #14453
Labels
bug 🐛
low effort
There is not much implementation work to be done. The task is very easy or tiny.
low impact
Changes are not very noticeable or potential benefits are limited.
must have eventually
Something we consider essential but not enough to prevent us from releasing Solidity 1.0 without it.
Description
In the
sources
output in Yul mode (when present), the ID of each source is given as1
, instead of0
. This is inconsistent with Solidity's general practice of 0-indexing sources. Worse yet, it's inconsistent with the numbering elsewhere in the output, namely, the source map and the AST; both of these will give the ID as0
.Environment
Steps to Reproduce
Any Yul source code will do, just make sure to request ASTs in the output (about which see #14452) so that you get
sources
output. Also good idea to request the source map as well for comparison.The text was updated successfully, but these errors were encountered: