mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Standard-JSON-Interface: Fix a bug (#8371) related to empty filenames and imports.
This commit is contained in:
parent
44bcff42f5
commit
8524e3f48d
@ -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)
|
||||
|
@ -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]);
|
||||
|
1
test/cmdlineTests/standard_empty_file_name/exit
Normal file
1
test/cmdlineTests/standard_empty_file_name/exit
Normal file
@ -0,0 +1 @@
|
||||
0
|
10
test/cmdlineTests/standard_empty_file_name/input.json
Normal file
10
test/cmdlineTests/standard_empty_file_name/input.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"language": "Solidity",
|
||||
"sources":
|
||||
{
|
||||
"":
|
||||
{
|
||||
"content": "pragma solidity >=0.0; import {A} from \".\";"
|
||||
}
|
||||
}
|
||||
}
|
4
test/cmdlineTests/standard_empty_file_name/output.json
Normal file
4
test/cmdlineTests/standard_empty_file_name/output.json
Normal 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":{}}
|
Loading…
Reference in New Issue
Block a user