aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLianaHus <liana@ethdev.com>2015-09-24 19:58:51 +0800
committerLianaHus <liana@ethdev.com>2015-10-02 18:38:48 +0800
commitdb9cc9c6ef2d5edb2dc3ed679c87f4d73b7b232e (patch)
tree8493eb559f5ea75e23bc59137d485f80fbb415ec /test
parent0bedebe9b54e8c445476a5650cd7eacc3d060b02 (diff)
downloaddexon-solidity-db9cc9c6ef2d5edb2dc3ed679c87f4d73b7b232e.tar
dexon-solidity-db9cc9c6ef2d5edb2dc3ed679c87f4d73b7b232e.tar.gz
dexon-solidity-db9cc9c6ef2d5edb2dc3ed679c87f4d73b7b232e.tar.bz2
dexon-solidity-db9cc9c6ef2d5edb2dc3ed679c87f4d73b7b232e.tar.lz
dexon-solidity-db9cc9c6ef2d5edb2dc3ed679c87f4d73b7b232e.tar.xz
dexon-solidity-db9cc9c6ef2d5edb2dc3ed679c87f4d73b7b232e.tar.zst
dexon-solidity-db9cc9c6ef2d5edb2dc3ed679c87f4d73b7b232e.zip
added test
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index cac16682..fd908955 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -2318,6 +2318,24 @@ BOOST_AUTO_TEST_CASE(literal_string_to_storage_pointer)
SOLIDITY_CHECK_ERROR_TYPE(parseAndAnalyseReturnError(text), TypeError);
}
+BOOST_AUTO_TEST_CASE(non_initialized_references)
+{
+ char const* text = R"(
+ contract c
+ {
+ struct s{
+ uint a;
+ }
+ function f()
+ {
+ s x;
+ x.a = 2;
+ }
+ }
+ )";
+ SOLIDITY_CHECK_ERROR_TYPE(parseAndAnalyseReturnError(text), TypeError);
+}
+
BOOST_AUTO_TEST_SUITE_END()
}