Merge pull request #7061 from ethereum/fixCommandline

Fix commandline tests.
This commit is contained in:
chriseth 2019-07-08 14:38:22 +02:00 committed by GitHub
commit 035fde2932
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -345,8 +345,8 @@ void ContractLevelChecker::annotateBaseConstructorArguments(
else
{
mainLocation = &_currentContract.location();
ssl.append("First constructor call is here: ", _argumentNode->location());
ssl.append("Second constructor call is here: ", previousNode->location());
ssl.append("First constructor call is here:", _argumentNode->location());
ssl.append("Second constructor call is here:", previousNode->location());
}
m_errorReporter.declarationError(

View File

@ -1 +1,10 @@
{"errors":[{"component":"general","formattedMessage":"A:1:112: DeclarationError: Base constructor arguments given twice.\npragma solidity >=0.0; contract A { constructor(uint) public {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {}\n ^-------------------^\nA:1:81: First constructor call is here: \npragma solidity >=0.0; contract A { constructor(uint) public {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {}\n ^--^\nA:1:104: Second constructor call is here: \npragma solidity >=0.0; contract A { constructor(uint) public {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {}\n ^--^\n","message":"Base constructor arguments given twice.","secondarySourceLocations":[{"end":84,"file":"A","message":"First constructor call is here: ","start":80},{"end":107,"file":"A","message":"Second constructor call is here: ","start":103}],"severity":"error","sourceLocation":{"end":132,"file":"A","start":111},"type":"DeclarationError"}],"sources":{}}
{"errors":[{"component":"general","formattedMessage":"A:1:112: DeclarationError: Base constructor arguments given twice.
pragma solidity >=0.0; contract A { constructor(uint) public {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {}
^-------------------^
A:1:81: First constructor call is here:
pragma solidity >=0.0; contract A { constructor(uint) public {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {}
^--^
A:1:104: Second constructor call is here:
pragma solidity >=0.0; contract A { constructor(uint) public {} } contract B is A(2) { } contract C is A(3) {} contract D is B, C {}
^--^
","message":"Base constructor arguments given twice.","secondarySourceLocations":[{"end":84,"file":"A","message":"First constructor call is here:","start":80},{"end":107,"file":"A","message":"Second constructor call is here:","start":103}],"severity":"error","sourceLocation":{"end":132,"file":"A","start":111},"type":"DeclarationError"}],"sources":{}}