Disallow non-namable types for inline arrays.

This commit is contained in:
chriseth
2020-05-26 18:17:35 +02:00
parent e4b31e7230
commit d0b6de580f
4 changed files with 21 additions and 0 deletions
@@ -0,0 +1,7 @@
contract C {
function f() public {
[msg];
}
}
// ----
// TypeError: (47-52): Unable to deduce nameable type for array elements. Try adding explicit type conversion for the first element.
@@ -0,0 +1,7 @@
contract C {
function f() public {
[type(C)];
}
}
// ----
// TypeError: (47-56): Unable to deduce nameable type for array elements. Try adding explicit type conversion for the first element.