mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9024 from ethereum/namableTypes
Disallow non-namable types for inline arrays.
This commit is contained in:
@@ -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.
|
||||
Reference in New Issue
Block a user