diff options
47 files changed, 96 insertions, 69 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml index 4514626b..aec8be18 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -179,6 +179,15 @@ jobs: name: Check spelling command: ~/.local/bin/codespell -S "*.enc,.git" -I ./scripts/codespell_whitelist.txt + test_trailing_whitespace: + docker: + - image: buildpack-deps:artful + steps: + - checkout + - run: + name: Check for trailing whitespace + command: ./scripts/detect_trailing_whitespace.sh + test_buglist: docker: - image: circleci/node @@ -263,6 +272,7 @@ workflows: build_all: jobs: - test_check_spelling: *build_on_tags + - test_trailing_whitespace: *build_on_tags - test_buglist: *build_on_tags - build_emscripten: *build_on_tags - test_emscripten_solcjs: diff --git a/Changelog.md b/Changelog.md index c9d80432..bf99123b 100644 --- a/Changelog.md +++ b/Changelog.md @@ -113,6 +113,7 @@ Bugfixes: * Type Checker: Report error when using indexed structs in events with experimental ABIEncoderV2. This used to log wrong values. * Type Checker: Dynamic types as key for public mappings return error instead of assertion fail. * Type System: Allow arbitrary exponents for literals with a mantissa of zero. + * Parser: Fix incorrect source location for nameless parameters. ### 0.4.24 (2018-05-16) diff --git a/docs/grammar.txt b/docs/grammar.txt index 809fcffc..43ef07a9 100644 --- a/docs/grammar.txt +++ b/docs/grammar.txt @@ -131,7 +131,7 @@ HexLiteral = 'hex' ('"' ([0-9a-fA-F]{2})* '"' | '\'' ([0-9a-fA-F]{2})* '\'') StringLiteral = '"' ([^"\r\n\\] | '\\' .)* '"' Identifier = [a-zA-Z_$] [a-zA-Z_$0-9]* -HexNumber = '0x' [0-9a-fA-F]+ +HexNumber = '0' [xX] [0-9a-fA-F]+ DecimalNumber = [0-9]+ ( '.' [0-9]* )? ( [eE] [0-9]+ )? TupleExpression = '(' ( Expression? ( ',' Expression? )* )? ')' diff --git a/docs/using-the-compiler.rst b/docs/using-the-compiler.rst index b286e1a3..0a64d840 100644 --- a/docs/using-the-compiler.rst +++ b/docs/using-the-compiler.rst @@ -83,6 +83,8 @@ Input Description [ "bzzr://56ab...", "ipfs://Qma...", + // If files are used, their directories should be added to the command line via + // `--allow-paths <path>`. "file:///tmp/path/to/file.sol" ] }, diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp index aa9e438f..4cc4ba53 100644 --- a/libsolidity/codegen/ExpressionCompiler.cpp +++ b/libsolidity/codegen/ExpressionCompiler.cpp @@ -1831,7 +1831,7 @@ void ExpressionCompiler::appendExternalFunctionCall( auto funKind = _functionType.kind(); solAssert(funKind != FunctionType::Kind::BareStaticCall || m_context.evmVersion().hasStaticCall(), ""); - + bool returnSuccessConditionAndReturndata = funKind == FunctionType::Kind::BareCall || funKind == FunctionType::Kind::BareCallCode || funKind == FunctionType::Kind::BareDelegateCall || funKind == FunctionType::Kind::BareStaticCall; bool isCallCode = funKind == FunctionType::Kind::BareCallCode; bool isDelegateCall = funKind == FunctionType::Kind::BareDelegateCall || funKind == FunctionType::Kind::DelegateCall; diff --git a/libsolidity/parsing/Parser.cpp b/libsolidity/parsing/Parser.cpp index bfa0ad24..c9c26f57 100644 --- a/libsolidity/parsing/Parser.cpp +++ b/libsolidity/parsing/Parser.cpp @@ -572,6 +572,7 @@ ASTPointer<VariableDeclaration> Parser::parseVariableDeclaration( Token::Value token = m_scanner->currentToken(); if (_options.isStateVariable && Token::isVariableVisibilitySpecifier(token)) { + nodeFactory.markEndPosition(); if (visibility != Declaration::Visibility::Default) { parserError(string( @@ -616,21 +617,21 @@ ASTPointer<VariableDeclaration> Parser::parseVariableDeclaration( } else break; + nodeFactory.markEndPosition(); m_scanner->next(); } } - nodeFactory.markEndPosition(); if (_options.allowEmptyName && m_scanner->currentToken() != Token::Identifier) { identifier = make_shared<ASTString>(""); solAssert(!_options.allowVar, ""); // allowEmptyName && allowVar makes no sense - if (type) - nodeFactory.setEndPositionFromNode(type); - // if type is null this has already caused an error } else + { + nodeFactory.markEndPosition(); identifier = expectIdentifierToken(); + } ASTPointer<Expression> value; if (_options.allowInitialValue) { diff --git a/scripts/detect_trailing_whitespace.sh b/scripts/detect_trailing_whitespace.sh new file mode 100755 index 00000000..1a136a10 --- /dev/null +++ b/scripts/detect_trailing_whitespace.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash + +REPO_ROOT="$(dirname "$0")"/.. + +( +cd $REPO_ROOT +WHITESPACE=$(git grep -n -I -E "^.*[[:space:]]+$" | grep -v "test/libsolidity/ASTJSON\|test/compilationTests/zeppelin/LICENSE") + +if [[ "$WHITESPACE" != "" ]] +then + echo "Error: Trailing whitespace found:" >&2 + echo "$WHITESPACE" >&2 + exit 1 +fi +) diff --git a/scripts/release.bat b/scripts/release.bat index 6415a040..b15b49b7 100644 --- a/scripts/release.bat +++ b/scripts/release.bat @@ -32,11 +32,9 @@ set VERSION=%2 IF "%VERSION%"=="2015" ( set "DLLS=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86\Microsoft.VC140.CRT\msvc*.dll" ) ELSE ( - IF EXIST "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.14.26405\x86\Microsoft.VC141.CRT\" ( - set "DLLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.14.26405\x86\Microsoft.VC141.CRT\msvc*.dll" - ) ELSE ( - set "DLLS=C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\14.14.26405\x86\Microsoft.VC141.CRT\msvc*.dll" - ) + set "DLLS=MSVC_DLLS_NOT_FOUND" + FOR /d %%d IN ("C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Redist\MSVC\*" + "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\*") DO set "DLLS=%%d\x86\Microsoft.VC141.CRT\msvc*.dll" ) 7z a solidity-windows.zip ^ diff --git a/test/cmdlineTests.sh b/test/cmdlineTests.sh index c9acb99a..6f8a8ac1 100755 --- a/test/cmdlineTests.sh +++ b/test/cmdlineTests.sh @@ -172,12 +172,12 @@ done ) printTask "Compiling all examples from the documentation..." -TMPDIR=$(mktemp -d) +SOLTMPDIR=$(mktemp -d) ( set -e cd "$REPO_ROOT" REPO_ROOT=$(pwd) # make it absolute - cd "$TMPDIR" + cd "$SOLTMPDIR" "$REPO_ROOT"/scripts/isolate_tests.py "$REPO_ROOT"/docs/ docs for f in *.sol do @@ -199,10 +199,10 @@ TMPDIR=$(mktemp -d) then opts="$opts -w" fi - compileFull $opts "$TMPDIR/$f" + compileFull $opts "$SOLTMPDIR/$f" done ) -rm -rf "$TMPDIR" +rm -rf "$SOLTMPDIR" echo "Done." printTask "Testing library checksum..." @@ -213,17 +213,17 @@ printTask "Testing long library names..." echo '' | "$SOLC" - --link --libraries aveeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeerylonglibraryname:0x90f20564390eAe531E810af625A22f51385Cd222 >/dev/null printTask "Testing overwriting files..." -TMPDIR=$(mktemp -d) +SOLTMPDIR=$(mktemp -d) ( set -e # First time it works - echo 'contract C {} ' | "$SOLC" - --bin -o "$TMPDIR/non-existing-stuff-to-create" 2>/dev/null + echo 'contract C {} ' | "$SOLC" - --bin -o "$SOLTMPDIR/non-existing-stuff-to-create" 2>/dev/null # Second time it fails - ! echo 'contract C {} ' | "$SOLC" - --bin -o "$TMPDIR/non-existing-stuff-to-create" 2>/dev/null + ! echo 'contract C {} ' | "$SOLC" - --bin -o "$SOLTMPDIR/non-existing-stuff-to-create" 2>/dev/null # Unless we force - echo 'contract C {} ' | "$SOLC" - --overwrite --bin -o "$TMPDIR/non-existing-stuff-to-create" 2>/dev/null + echo 'contract C {} ' | "$SOLC" - --overwrite --bin -o "$SOLTMPDIR/non-existing-stuff-to-create" 2>/dev/null ) -rm -rf "$TMPDIR" +rm -rf "$SOLTMPDIR" printTask "Testing assemble, yul, strict-assembly..." echo '{}' | "$SOLC" - --assemble &>/dev/null @@ -231,7 +231,7 @@ echo '{}' | "$SOLC" - --yul &>/dev/null echo '{}' | "$SOLC" - --strict-assembly &>/dev/null printTask "Testing standard input..." -TMPDIR=$(mktemp -d) +SOLTMPDIR=$(mktemp -d) ( set +e output=$("$SOLC" --bin 2>&1) @@ -256,12 +256,12 @@ TMPDIR=$(mktemp -d) ) printTask "Testing soljson via the fuzzer..." -TMPDIR=$(mktemp -d) +SOLTMPDIR=$(mktemp -d) ( set -e cd "$REPO_ROOT" REPO_ROOT=$(pwd) # make it absolute - cd "$TMPDIR" + cd "$SOLTMPDIR" "$REPO_ROOT"/scripts/isolate_tests.py "$REPO_ROOT"/test/ "$REPO_ROOT"/scripts/isolate_tests.py "$REPO_ROOT"/docs/ docs for f in *.sol @@ -283,5 +283,5 @@ TMPDIR=$(mktemp -d) set -e done ) -rm -rf "$TMPDIR" +rm -rf "$SOLTMPDIR" echo "Commandline tests successful." diff --git a/test/libsolidity/syntaxTests/controlFlow/mappingReturn/unnamed_err.sol b/test/libsolidity/syntaxTests/controlFlow/mappingReturn/unnamed_err.sol index 7e8c4501..52a8b3d7 100644 --- a/test/libsolidity/syntaxTests/controlFlow/mappingReturn/unnamed_err.sol +++ b/test/libsolidity/syntaxTests/controlFlow/mappingReturn/unnamed_err.sol @@ -2,4 +2,4 @@ contract C { function f() internal pure returns (mapping(uint=>uint) storage) {} } // ---- -// TypeError: (53-72): This variable is of storage pointer type and might be returned without assignment and could be used uninitialized. Assign the variable (potentially from itself) to fix this error. +// TypeError: (53-80): This variable is of storage pointer type and might be returned without assignment and could be used uninitialized. Assign the variable (potentially from itself) to fix this error. diff --git a/test/libsolidity/syntaxTests/controlFlow/storageReturn/assembly_err.sol b/test/libsolidity/syntaxTests/controlFlow/storageReturn/assembly_err.sol index 5fde497c..cad9b8e8 100644 --- a/test/libsolidity/syntaxTests/controlFlow/storageReturn/assembly_err.sol +++ b/test/libsolidity/syntaxTests/controlFlow/storageReturn/assembly_err.sol @@ -7,4 +7,4 @@ contract C { } } // ---- -// TypeError: (87-88): This variable is of storage pointer type and might be returned without assignment and could be used uninitialized. Assign the variable (potentially from itself) to fix this error. +// TypeError: (87-96): This variable is of storage pointer type and might be returned without assignment and could be used uninitialized. Assign the variable (potentially from itself) to fix this error. diff --git a/test/libsolidity/syntaxTests/controlFlow/storageReturn/modifier_err.sol b/test/libsolidity/syntaxTests/controlFlow/storageReturn/modifier_err.sol index a0047782..42342979 100644 --- a/test/libsolidity/syntaxTests/controlFlow/storageReturn/modifier_err.sol +++ b/test/libsolidity/syntaxTests/controlFlow/storageReturn/modifier_err.sol @@ -18,5 +18,5 @@ contract C { } } // ---- -// TypeError: (249-250): This variable is of storage pointer type and might be returned without assignment and could be used uninitialized. Assign the variable (potentially from itself) to fix this error. -// TypeError: (367-368): This variable is of storage pointer type and might be returned without assignment and could be used uninitialized. Assign the variable (potentially from itself) to fix this error. +// TypeError: (249-258): This variable is of storage pointer type and might be returned without assignment and could be used uninitialized. Assign the variable (potentially from itself) to fix this error. +// TypeError: (367-376): This variable is of storage pointer type and might be returned without assignment and could be used uninitialized. Assign the variable (potentially from itself) to fix this error. diff --git a/test/libsolidity/syntaxTests/dataLocations/data_location_in_function_type_fail.sol b/test/libsolidity/syntaxTests/dataLocations/data_location_in_function_type_fail.sol index e1ea6989..b80849ce 100644 --- a/test/libsolidity/syntaxTests/dataLocations/data_location_in_function_type_fail.sol +++ b/test/libsolidity/syntaxTests/dataLocations/data_location_in_function_type_fail.sol @@ -5,5 +5,5 @@ library L { } // ---- -// TypeError: (66-72): Data location must be "memory" for parameter in function, but "calldata" was given. -// TypeError: (159-165): Data location must be "memory" for parameter in function, but "storage" was given. +// TypeError: (66-81): Data location must be "memory" for parameter in function, but "calldata" was given. +// TypeError: (159-173): Data location must be "memory" for parameter in function, but "storage" was given. diff --git a/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_memory.sol b/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_memory.sol index d914fa5b..d30bde3f 100644 --- a/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_memory.sol +++ b/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_memory.sol @@ -2,4 +2,4 @@ contract test { function f(bytes memory) external; } // ---- -// TypeError: (31-36): Data location must be "calldata" for parameter in external function, but "memory" was given. +// TypeError: (31-43): Data location must be "calldata" for parameter in external function, but "memory" was given. diff --git a/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_storage.sol b/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_storage.sol index adb7e52e..7dc5ba6d 100644 --- a/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_storage.sol +++ b/test/libsolidity/syntaxTests/dataLocations/externalFunction/function_argument_location_specifier_test_external_storage.sol @@ -2,4 +2,4 @@ contract test { function f(bytes storage) external; } // ---- -// TypeError: (31-36): Data location must be "calldata" for parameter in external function, but "storage" was given. +// TypeError: (31-44): Data location must be "calldata" for parameter in external function, but "storage" was given. diff --git a/test/libsolidity/syntaxTests/dataLocations/function_argument_location_specifier_test_non_reference_type.sol b/test/libsolidity/syntaxTests/dataLocations/function_argument_location_specifier_test_non_reference_type.sol index 71756ebb..bc14aa1f 100644 --- a/test/libsolidity/syntaxTests/dataLocations/function_argument_location_specifier_test_non_reference_type.sol +++ b/test/libsolidity/syntaxTests/dataLocations/function_argument_location_specifier_test_non_reference_type.sol @@ -2,4 +2,4 @@ contract test { function f(bytes4 memory) public; } // ---- -// TypeError: (31-37): Data location can only be specified for array, struct or mapping types, but "memory" was given. +// TypeError: (31-44): Data location can only be specified for array, struct or mapping types, but "memory" was given. diff --git a/test/libsolidity/syntaxTests/dataLocations/internalFunction/function_argument_location_specifier_test_internal_calldata.sol b/test/libsolidity/syntaxTests/dataLocations/internalFunction/function_argument_location_specifier_test_internal_calldata.sol index 771f1525..da3abff4 100644 --- a/test/libsolidity/syntaxTests/dataLocations/internalFunction/function_argument_location_specifier_test_internal_calldata.sol +++ b/test/libsolidity/syntaxTests/dataLocations/internalFunction/function_argument_location_specifier_test_internal_calldata.sol @@ -2,4 +2,4 @@ contract test { function f(bytes calldata) internal; } // ---- -// TypeError: (31-36): Data location must be "storage" or "memory" for parameter in function, but "calldata" was given. +// TypeError: (31-45): Data location must be "storage" or "memory" for parameter in function, but "calldata" was given. diff --git a/test/libsolidity/syntaxTests/dataLocations/libraryExternalFunction/function_argument_location_specifier_test_external_memory.sol b/test/libsolidity/syntaxTests/dataLocations/libraryExternalFunction/function_argument_location_specifier_test_external_memory.sol index 9a6b8b7c..2de0082a 100644 --- a/test/libsolidity/syntaxTests/dataLocations/libraryExternalFunction/function_argument_location_specifier_test_external_memory.sol +++ b/test/libsolidity/syntaxTests/dataLocations/libraryExternalFunction/function_argument_location_specifier_test_external_memory.sol @@ -2,4 +2,4 @@ library test { function f(bytes memory) external; } // ---- -// TypeError: (30-35): Data location must be "storage" or "calldata" for parameter in external function, but "memory" was given. +// TypeError: (30-42): Data location must be "storage" or "calldata" for parameter in external function, but "memory" was given. diff --git a/test/libsolidity/syntaxTests/dataLocations/libraryInternalFunction/function_argument_location_specifier_test_internal_calldata.sol b/test/libsolidity/syntaxTests/dataLocations/libraryInternalFunction/function_argument_location_specifier_test_internal_calldata.sol index 99b89dfc..c4b81f98 100644 --- a/test/libsolidity/syntaxTests/dataLocations/libraryInternalFunction/function_argument_location_specifier_test_internal_calldata.sol +++ b/test/libsolidity/syntaxTests/dataLocations/libraryInternalFunction/function_argument_location_specifier_test_internal_calldata.sol @@ -2,4 +2,4 @@ library test { function f(bytes calldata) internal pure {} } // ---- -// TypeError: (30-35): Data location must be "storage" or "memory" for parameter in function, but "calldata" was given. +// TypeError: (30-44): Data location must be "storage" or "memory" for parameter in function, but "calldata" was given. diff --git a/test/libsolidity/syntaxTests/dataLocations/publicFunction/function_argument_location_specifier_test_public_calldata.sol b/test/libsolidity/syntaxTests/dataLocations/publicFunction/function_argument_location_specifier_test_public_calldata.sol index efc92cf3..3aba870f 100644 --- a/test/libsolidity/syntaxTests/dataLocations/publicFunction/function_argument_location_specifier_test_public_calldata.sol +++ b/test/libsolidity/syntaxTests/dataLocations/publicFunction/function_argument_location_specifier_test_public_calldata.sol @@ -2,4 +2,4 @@ contract test { function f(bytes calldata) public; } // ---- -// TypeError: (31-36): Data location must be "memory" for parameter in function, but "calldata" was given. +// TypeError: (31-45): Data location must be "memory" for parameter in function, but "calldata" was given. diff --git a/test/libsolidity/syntaxTests/dataLocations/publicFunction/function_argument_location_specifier_test_public_storage.sol b/test/libsolidity/syntaxTests/dataLocations/publicFunction/function_argument_location_specifier_test_public_storage.sol index b954ea78..1c033a69 100644 --- a/test/libsolidity/syntaxTests/dataLocations/publicFunction/function_argument_location_specifier_test_public_storage.sol +++ b/test/libsolidity/syntaxTests/dataLocations/publicFunction/function_argument_location_specifier_test_public_storage.sol @@ -2,4 +2,4 @@ contract test { function f(bytes storage) public; } // ---- -// TypeError: (31-36): Data location must be "memory" for parameter in function, but "storage" was given. +// TypeError: (31-44): Data location must be "memory" for parameter in function, but "storage" was given. diff --git a/test/libsolidity/syntaxTests/events/event_array_indexed_v2.sol b/test/libsolidity/syntaxTests/events/event_array_indexed_v2.sol index aaf6028a..3f729a6a 100644 --- a/test/libsolidity/syntaxTests/events/event_array_indexed_v2.sol +++ b/test/libsolidity/syntaxTests/events/event_array_indexed_v2.sol @@ -4,4 +4,4 @@ contract c { } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// TypeError: (59-65): Indexed reference types cannot yet be used with ABIEncoderV2. +// TypeError: (59-73): Indexed reference types cannot yet be used with ABIEncoderV2. diff --git a/test/libsolidity/syntaxTests/events/event_nested_array_indexed_v2.sol b/test/libsolidity/syntaxTests/events/event_nested_array_indexed_v2.sol index ffae5b9c..f05b884e 100644 --- a/test/libsolidity/syntaxTests/events/event_nested_array_indexed_v2.sol +++ b/test/libsolidity/syntaxTests/events/event_nested_array_indexed_v2.sol @@ -4,4 +4,4 @@ contract c { } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// TypeError: (59-67): Indexed reference types cannot yet be used with ABIEncoderV2. +// TypeError: (59-75): Indexed reference types cannot yet be used with ABIEncoderV2. diff --git a/test/libsolidity/syntaxTests/events/event_struct_indexed.sol b/test/libsolidity/syntaxTests/events/event_struct_indexed.sol index 69ee5017..7332cb3b 100644 --- a/test/libsolidity/syntaxTests/events/event_struct_indexed.sol +++ b/test/libsolidity/syntaxTests/events/event_struct_indexed.sol @@ -3,4 +3,4 @@ contract c { event E(S indexed); } // ---- -// TypeError: (51-52): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature. +// TypeError: (51-60): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature. diff --git a/test/libsolidity/syntaxTests/events/event_struct_indexed_v2.sol b/test/libsolidity/syntaxTests/events/event_struct_indexed_v2.sol index a8e0837f..a1d8cf04 100644 --- a/test/libsolidity/syntaxTests/events/event_struct_indexed_v2.sol +++ b/test/libsolidity/syntaxTests/events/event_struct_indexed_v2.sol @@ -5,4 +5,4 @@ contract c { } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// TypeError: (85-86): Indexed reference types cannot yet be used with ABIEncoderV2. +// TypeError: (85-94): Indexed reference types cannot yet be used with ABIEncoderV2. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/041_functions_with_stucts_of_non_external_types_in_interface.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/041_functions_with_stucts_of_non_external_types_in_interface.sol index 9fd09dd7..73b608ae 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/041_functions_with_stucts_of_non_external_types_in_interface.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/041_functions_with_stucts_of_non_external_types_in_interface.sol @@ -6,4 +6,4 @@ contract C { } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// TypeError: (103-104): Internal or recursive type is not allowed for public or external functions. +// TypeError: (103-111): Internal or recursive type is not allowed for public or external functions. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/042_functions_with_stucts_of_non_external_types_in_interface_2.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/042_functions_with_stucts_of_non_external_types_in_interface_2.sol index 435a02ef..607a4a68 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/042_functions_with_stucts_of_non_external_types_in_interface_2.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/042_functions_with_stucts_of_non_external_types_in_interface_2.sol @@ -6,4 +6,4 @@ contract C { } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// TypeError: (105-106): Internal or recursive type is not allowed for public or external functions. +// TypeError: (105-113): Internal or recursive type is not allowed for public or external functions. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/043_functions_with_stucts_of_non_external_types_in_interface_nested.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/043_functions_with_stucts_of_non_external_types_in_interface_nested.sol index b9dc7c2e..da73d8dd 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/043_functions_with_stucts_of_non_external_types_in_interface_nested.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/043_functions_with_stucts_of_non_external_types_in_interface_nested.sol @@ -7,4 +7,4 @@ contract C { } // ---- // Warning: (0-33): Experimental features are turned on. Do not use experimental features on live deployments. -// TypeError: (132-133): Internal or recursive type is not allowed for public or external functions. +// TypeError: (132-140): Internal or recursive type is not allowed for public or external functions. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/045_returning_multi_dimensional_arrays.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/045_returning_multi_dimensional_arrays.sol index 221e5fa4..b9a64c2a 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/045_returning_multi_dimensional_arrays.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/045_returning_multi_dimensional_arrays.sol @@ -2,4 +2,4 @@ contract C { function f() public pure returns (string[][] memory) {} } // ---- -// TypeError: (51-61): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature. +// TypeError: (51-68): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature. diff --git a/test/libsolidity/syntaxTests/nameAndTypeResolution/046_returning_multi_dimensional_static_arrays.sol b/test/libsolidity/syntaxTests/nameAndTypeResolution/046_returning_multi_dimensional_static_arrays.sol index 75423bc9..ccee6093 100644 --- a/test/libsolidity/syntaxTests/nameAndTypeResolution/046_returning_multi_dimensional_static_arrays.sol +++ b/test/libsolidity/syntaxTests/nameAndTypeResolution/046_returning_multi_dimensional_static_arrays.sol @@ -2,4 +2,4 @@ contract C { function f() public pure returns (uint[][2] memory) {} } // ---- -// TypeError: (51-60): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature. +// TypeError: (51-67): This type is only supported in the new experimental ABI encoder. Use "pragma experimental ABIEncoderV2;" to enable the feature. diff --git a/test/libsolidity/syntaxTests/structs/recursion/return_recursive_structs.sol b/test/libsolidity/syntaxTests/structs/recursion/return_recursive_structs.sol index 89d1ddd9..c8f9185c 100644 --- a/test/libsolidity/syntaxTests/structs/recursion/return_recursive_structs.sol +++ b/test/libsolidity/syntaxTests/structs/recursion/return_recursive_structs.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (91-92): Internal or recursive type is not allowed for public or external functions. +// TypeError: (91-99): Internal or recursive type is not allowed for public or external functions. diff --git a/test/libsolidity/syntaxTests/structs/recursion/return_recursive_structs2.sol b/test/libsolidity/syntaxTests/structs/recursion/return_recursive_structs2.sol index 1c31e180..a8b7ac75 100644 --- a/test/libsolidity/syntaxTests/structs/recursion/return_recursive_structs2.sol +++ b/test/libsolidity/syntaxTests/structs/recursion/return_recursive_structs2.sol @@ -4,4 +4,4 @@ contract C { } } // ---- -// TypeError: (94-95): Internal or recursive type is not allowed for public or external functions. +// TypeError: (94-102): Internal or recursive type is not allowed for public or external functions. diff --git a/test/libsolidity/syntaxTests/types/mapping/argument_external.sol b/test/libsolidity/syntaxTests/types/mapping/argument_external.sol index 02beefec..2b5e6b05 100644 --- a/test/libsolidity/syntaxTests/types/mapping/argument_external.sol +++ b/test/libsolidity/syntaxTests/types/mapping/argument_external.sol @@ -3,4 +3,4 @@ contract C { } } // ---- -// TypeError: (28-49): Data location must be "calldata" for parameter in external function, but "storage" was given. +// TypeError: (28-57): Data location must be "calldata" for parameter in external function, but "storage" was given. diff --git a/test/libsolidity/syntaxTests/types/mapping/argument_public.sol b/test/libsolidity/syntaxTests/types/mapping/argument_public.sol index 3939cf26..32f11fe9 100644 --- a/test/libsolidity/syntaxTests/types/mapping/argument_public.sol +++ b/test/libsolidity/syntaxTests/types/mapping/argument_public.sol @@ -3,4 +3,4 @@ contract C { } } // ---- -// TypeError: (28-49): Data location must be "memory" for parameter in function, but "storage" was given. +// TypeError: (28-57): Data location must be "memory" for parameter in function, but "storage" was given. diff --git a/test/libsolidity/syntaxTests/types/mapping/array_argument_external.sol b/test/libsolidity/syntaxTests/types/mapping/array_argument_external.sol index ef0046d4..0863653c 100644 --- a/test/libsolidity/syntaxTests/types/mapping/array_argument_external.sol +++ b/test/libsolidity/syntaxTests/types/mapping/array_argument_external.sol @@ -3,4 +3,4 @@ contract C { } } // ---- -// TypeError: (28-51): Data location must be "calldata" for parameter in external function, but "storage" was given. +// TypeError: (28-59): Data location must be "calldata" for parameter in external function, but "storage" was given. diff --git a/test/libsolidity/syntaxTests/types/mapping/array_argument_public.sol b/test/libsolidity/syntaxTests/types/mapping/array_argument_public.sol index fb3f25a4..99c83d8a 100644 --- a/test/libsolidity/syntaxTests/types/mapping/array_argument_public.sol +++ b/test/libsolidity/syntaxTests/types/mapping/array_argument_public.sol @@ -3,4 +3,4 @@ contract C { } } // ---- -// TypeError: (28-51): Data location must be "memory" for parameter in function, but "storage" was given. +// TypeError: (28-59): Data location must be "memory" for parameter in function, but "storage" was given. diff --git a/test/libsolidity/syntaxTests/types/mapping/function_type_argument_external.sol b/test/libsolidity/syntaxTests/types/mapping/function_type_argument_external.sol index 349a4f97..34f95701 100644 --- a/test/libsolidity/syntaxTests/types/mapping/function_type_argument_external.sol +++ b/test/libsolidity/syntaxTests/types/mapping/function_type_argument_external.sol @@ -3,5 +3,5 @@ contract C { } } // ---- -// TypeError: (37-56): Data location must be "memory" for parameter in function, but "storage" was given. -// TypeError: (37-56): Internal type cannot be used for external function type. +// TypeError: (37-64): Data location must be "memory" for parameter in function, but "storage" was given. +// TypeError: (37-64): Internal type cannot be used for external function type. diff --git a/test/libsolidity/syntaxTests/types/mapping/function_type_return_external.sol b/test/libsolidity/syntaxTests/types/mapping/function_type_return_external.sol index 108d9861..aed9b387 100644 --- a/test/libsolidity/syntaxTests/types/mapping/function_type_return_external.sol +++ b/test/libsolidity/syntaxTests/types/mapping/function_type_return_external.sol @@ -3,5 +3,5 @@ contract C { } } // ---- -// TypeError: (57-76): Data location must be "memory" for return parameter in function, but "storage" was given. -// TypeError: (57-76): Internal type cannot be used for external function type. +// TypeError: (57-84): Data location must be "memory" for return parameter in function, but "storage" was given. +// TypeError: (57-84): Internal type cannot be used for external function type. diff --git a/test/libsolidity/syntaxTests/types/mapping/library_argument_external.sol b/test/libsolidity/syntaxTests/types/mapping/library_argument_external.sol index e78c6930..1098008d 100644 --- a/test/libsolidity/syntaxTests/types/mapping/library_argument_external.sol +++ b/test/libsolidity/syntaxTests/types/mapping/library_argument_external.sol @@ -3,4 +3,4 @@ library L { } } // ---- -// TypeError: (27-48): Type is required to live outside storage. +// TypeError: (27-56): Type is required to live outside storage. diff --git a/test/libsolidity/syntaxTests/types/mapping/library_argument_public.sol b/test/libsolidity/syntaxTests/types/mapping/library_argument_public.sol index 56393b68..dedd4f68 100644 --- a/test/libsolidity/syntaxTests/types/mapping/library_argument_public.sol +++ b/test/libsolidity/syntaxTests/types/mapping/library_argument_public.sol @@ -3,4 +3,4 @@ library L { } } // ---- -// TypeError: (27-48): Type is required to live outside storage. +// TypeError: (27-56): Type is required to live outside storage. diff --git a/test/libsolidity/syntaxTests/types/mapping/library_array_argument_external.sol b/test/libsolidity/syntaxTests/types/mapping/library_array_argument_external.sol index f5691675..da5a911b 100644 --- a/test/libsolidity/syntaxTests/types/mapping/library_array_argument_external.sol +++ b/test/libsolidity/syntaxTests/types/mapping/library_array_argument_external.sol @@ -3,4 +3,4 @@ library L { } } // ---- -// TypeError: (27-50): Type is required to live outside storage. +// TypeError: (27-58): Type is required to live outside storage. diff --git a/test/libsolidity/syntaxTests/types/mapping/library_array_argument_public.sol b/test/libsolidity/syntaxTests/types/mapping/library_array_argument_public.sol index bb06d4bc..adb62203 100644 --- a/test/libsolidity/syntaxTests/types/mapping/library_array_argument_public.sol +++ b/test/libsolidity/syntaxTests/types/mapping/library_array_argument_public.sol @@ -3,4 +3,4 @@ library L { } } // ---- -// TypeError: (27-50): Type is required to live outside storage. +// TypeError: (27-58): Type is required to live outside storage. diff --git a/test/libsolidity/syntaxTests/types/mapping/library_return_external.sol b/test/libsolidity/syntaxTests/types/mapping/library_return_external.sol index a3bb1c32..1e756819 100644 --- a/test/libsolidity/syntaxTests/types/mapping/library_return_external.sol +++ b/test/libsolidity/syntaxTests/types/mapping/library_return_external.sol @@ -7,4 +7,4 @@ library L // ---- // TypeError: (27-58): Type is required to live outside storage. // TypeError: (60-91): Type is required to live outside storage. -// TypeError: (123-144): Type is required to live outside storage. +// TypeError: (123-152): Type is required to live outside storage. diff --git a/test/libsolidity/syntaxTests/types/mapping/library_return_public.sol b/test/libsolidity/syntaxTests/types/mapping/library_return_public.sol index ac52d677..357751a0 100644 --- a/test/libsolidity/syntaxTests/types/mapping/library_return_public.sol +++ b/test/libsolidity/syntaxTests/types/mapping/library_return_public.sol @@ -7,4 +7,4 @@ library L // ---- // TypeError: (27-58): Type is required to live outside storage. // TypeError: (60-91): Type is required to live outside storage. -// TypeError: (121-142): Type is required to live outside storage. +// TypeError: (121-150): Type is required to live outside storage. diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_array_data_location_function_param_external.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_array_data_location_function_param_external.sol index 9b96fd3a..0c29ebd8 100644 --- a/test/libsolidity/syntaxTests/types/mapping/mapping_array_data_location_function_param_external.sol +++ b/test/libsolidity/syntaxTests/types/mapping/mapping_array_data_location_function_param_external.sol @@ -2,5 +2,5 @@ contract c { function f1(mapping(uint => uint)[] calldata) pure external {} } // ---- -// TypeError: (29-52): Type is required to live outside storage. -// TypeError: (29-52): Internal or recursive type is not allowed for public or external functions. +// TypeError: (29-61): Type is required to live outside storage. +// TypeError: (29-61): Internal or recursive type is not allowed for public or external functions. diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_function_param_external.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_function_param_external.sol index adcfee2a..c050f8e9 100644 --- a/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_function_param_external.sol +++ b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_function_param_external.sol @@ -2,5 +2,5 @@ contract c { function f1(mapping(uint => uint) calldata) pure external returns (mapping(uint => uint) memory) {} } // ---- -// TypeError: (29-50): Type is required to live outside storage. -// TypeError: (29-50): Internal or recursive type is not allowed for public or external functions. +// TypeError: (29-59): Type is required to live outside storage. +// TypeError: (29-59): Internal or recursive type is not allowed for public or external functions. diff --git a/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_function_param_public.sol b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_function_param_public.sol index e98c1fe8..b63868b8 100644 --- a/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_function_param_public.sol +++ b/test/libsolidity/syntaxTests/types/mapping/mapping_data_location_function_param_public.sol @@ -2,5 +2,5 @@ contract c { function f3(mapping(uint => uint) memory) view public {} } // ---- -// TypeError: (29-50): Type is required to live outside storage. -// TypeError: (29-50): Internal or recursive type is not allowed for public or external functions. +// TypeError: (29-57): Type is required to live outside storage. +// TypeError: (29-57): Internal or recursive type is not allowed for public or external functions. |