Merge pull request #8377 from mijovic/solcEmptyFileName

Allowing filename to be empty in json settings file for solc. Fixing …
This commit is contained in:
chriseth 2020-02-25 14:30:02 +01:00 committed by GitHub
commit af81d4b6ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 1 deletions

View File

@ -8,6 +8,7 @@ Compiler Features:
Bugfixes:
* isoltest: Added new keyword `wei` to express function value in semantic tests
* Standard-JSON-Interface: Fix a bug related to empty filenames and imports.
### 0.6.3 (2020-02-18)

View File

@ -1005,7 +1005,6 @@ void CompilerStack::resolveImports()
if (ImportDirective const* import = dynamic_cast<ImportDirective*>(node.get()))
{
string const& path = import->annotation().absolutePath;
solAssert(!path.empty(), "");
solAssert(m_sources.count(path), "");
import->annotation().sourceUnit = m_sources[path].ast.get();
toposort(&m_sources[path]);

View File

@ -0,0 +1 @@
0

View File

@ -0,0 +1,10 @@
{
"language": "Solidity",
"sources":
{
"":
{
"content": "pragma solidity >=0.0; import {A} from \".\";"
}
}
}

View File

@ -0,0 +1,4 @@
{"errors":[{"component":"general","formattedMessage":":1:24: DeclarationError: Declaration \"A\" not found in \"\" (referenced as \".\").
pragma solidity >=0.0; import {A} from \".\";
^------------------^
","message":"Declaration \"A\" not found in \"\" (referenced as \".\").","severity":"error","type":"DeclarationError"}],"sources":{}}