aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-05-14 17:06:50 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-05-15 02:23:40 +0800
commit56238ab1ec99176e964e55bbb657c22f92b5200b (patch)
treeeb189a86c1366e8e1d008c45037f36c6a72656b2 /test/libsolidity
parent16e966dea0bdb3293b9958af26d697a1f59205f5 (diff)
downloaddexon-solidity-56238ab1ec99176e964e55bbb657c22f92b5200b.tar.gz
dexon-solidity-56238ab1ec99176e964e55bbb657c22f92b5200b.tar.zst
dexon-solidity-56238ab1ec99176e964e55bbb657c22f92b5200b.zip
Add test for default location.
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/syntaxTests/controlFlow/storageReturn/default_location.sol19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/controlFlow/storageReturn/default_location.sol b/test/libsolidity/syntaxTests/controlFlow/storageReturn/default_location.sol
new file mode 100644
index 00000000..9a42192d
--- /dev/null
+++ b/test/libsolidity/syntaxTests/controlFlow/storageReturn/default_location.sol
@@ -0,0 +1,19 @@
+contract C {
+ struct S { bool f; }
+ S s;
+ function f() internal view returns (S c) {
+ c = s;
+ }
+ function g() internal view returns (S) {
+ return s;
+ }
+ function h() internal pure returns (S) {
+ }
+ function i(bool flag) internal view returns (S c) {
+ if (flag) c = s;
+ }
+ function j(bool flag) internal view returns (S) {
+ if (flag) return s;
+ }
+}
+// ----