aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_structs.sol
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_structs.sol')
-rw-r--r--test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_structs.sol14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_structs.sol b/test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_structs.sol
new file mode 100644
index 00000000..378155e9
--- /dev/null
+++ b/test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_structs.sol
@@ -0,0 +1,14 @@
+contract C {
+ struct S { uint x; }
+ S s;
+ struct T { }
+ T t;
+ function f() public pure {
+ bytes32 a = sha256(s, t);
+ a;
+ }
+}
+// ----
+// Warning: Defining empty structs is deprecated.
+// TypeError: This type cannot be encoded.
+// TypeError: This type cannot be encoded.