mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2143 from ethereum/ast-index-fix
Fix source index allocation in CompilerStack
This commit is contained in:
commit
965de29772
@ -6,8 +6,11 @@ Features:
|
|||||||
path(s) of the supplied source file(s) is always trusted.
|
path(s) of the supplied source file(s) is always trusted.
|
||||||
|
|
||||||
Bugfixes:
|
Bugfixes:
|
||||||
* Type system: Contract inheriting from base with unimplemented constructor should be abstract.
|
|
||||||
* Assembly output: Implement missing AssemblyItem types.
|
* Assembly output: Implement missing AssemblyItem types.
|
||||||
|
* Compiler interface: Fix a bug where source indexes could be inconsistent between Solidity compiled
|
||||||
|
with different compilers (clang vs. gcc) or compiler settings. The bug was visible in AST
|
||||||
|
and source mappings.
|
||||||
|
* Type system: Contract inheriting from base with unimplemented constructor should be abstract.
|
||||||
|
|
||||||
### 0.4.10 (2017-03-15)
|
### 0.4.10 (2017-03-15)
|
||||||
|
|
||||||
|
@ -406,8 +406,9 @@ vector<string> CompilerStack::sourceNames() const
|
|||||||
map<string, unsigned> CompilerStack::sourceIndices() const
|
map<string, unsigned> CompilerStack::sourceIndices() const
|
||||||
{
|
{
|
||||||
map<string, unsigned> indices;
|
map<string, unsigned> indices;
|
||||||
|
unsigned index = 0;
|
||||||
for (auto const& s: m_sources)
|
for (auto const& s: m_sources)
|
||||||
indices[s.first] = indices.size();
|
indices[s.first] = index++;
|
||||||
return indices;
|
return indices;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user