aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/syntaxTests/types/bytes_to_contract.sol7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/types/bytes_to_contract.sol b/test/libsolidity/syntaxTests/types/bytes_to_contract.sol
new file mode 100644
index 00000000..2a3219ec
--- /dev/null
+++ b/test/libsolidity/syntaxTests/types/bytes_to_contract.sol
@@ -0,0 +1,7 @@
+contract C {
+ function f() public pure {
+ C(bytes20(0x1234));
+ }
+}
+// ----
+// TypeError: (64-82): Explicit type conversion not allowed from "bytes20" to "contract C".