Merge pull request #9024 from ethereum/namableTypes

Disallow non-namable types for inline arrays.
This commit is contained in:
chriseth
2020-05-27 09:21:07 +02:00
committed by GitHub
7 changed files with 51 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.