aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/controlFlow
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-08-08 02:46:42 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-08-08 02:49:52 +0800
commitbb518b59aa571ace18e0f50ddb847183952282d5 (patch)
tree56603dd5d99cfc622d8abe2170cf561dc979e52b /test/libsolidity/syntaxTests/controlFlow
parentcc83e69469ed3968d840effb340e925aceeb64fa (diff)
downloaddexon-solidity-bb518b59aa571ace18e0f50ddb847183952282d5.tar
dexon-solidity-bb518b59aa571ace18e0f50ddb847183952282d5.tar.gz
dexon-solidity-bb518b59aa571ace18e0f50ddb847183952282d5.tar.bz2
dexon-solidity-bb518b59aa571ace18e0f50ddb847183952282d5.tar.lz
dexon-solidity-bb518b59aa571ace18e0f50ddb847183952282d5.tar.xz
dexon-solidity-bb518b59aa571ace18e0f50ddb847183952282d5.tar.zst
dexon-solidity-bb518b59aa571ace18e0f50ddb847183952282d5.zip
Update and extend tests for return expressions.
Diffstat (limited to 'test/libsolidity/syntaxTests/controlFlow')
-rw-r--r--test/libsolidity/syntaxTests/controlFlow/storageReturn/emptyReturn_err.sol14
-rw-r--r--test/libsolidity/syntaxTests/controlFlow/storageReturn/emptyReturn_fine.sol7
2 files changed, 0 insertions, 21 deletions
diff --git a/test/libsolidity/syntaxTests/controlFlow/storageReturn/emptyReturn_err.sol b/test/libsolidity/syntaxTests/controlFlow/storageReturn/emptyReturn_err.sol
deleted file mode 100644
index 0d266ccf..00000000
--- a/test/libsolidity/syntaxTests/controlFlow/storageReturn/emptyReturn_err.sol
+++ /dev/null
@@ -1,14 +0,0 @@
-contract C {
- struct S { bool f; }
- S s;
- function f() internal pure returns (S storage) { return; }
- function g() internal view returns (S storage c, S storage) { c = s; return; }
- function h() internal view returns (S storage, S storage d) { d = s; return; }
- function i() internal pure returns (S storage, S storage) { return; }
-}
-// ----
-// 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: (163-164): 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: (233-234): 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: (316-317): 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: (327-328): 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/emptyReturn_fine.sol b/test/libsolidity/syntaxTests/controlFlow/storageReturn/emptyReturn_fine.sol
deleted file mode 100644
index 6d72e4ef..00000000
--- a/test/libsolidity/syntaxTests/controlFlow/storageReturn/emptyReturn_fine.sol
+++ /dev/null
@@ -1,7 +0,0 @@
-contract C {
- struct S { bool f; }
- S s;
- function f() internal view returns (S storage c, S storage d) { c = s; d = s; return; }
- function g() internal view returns (S storage, S storage) { return (s,s); }
-}
-// ----