mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow invalid use of library names as type names.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
library L {}
|
||||
contract C {
|
||||
function f() public {
|
||||
L[] memory x;
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 1130: (51-52): Invalid use of a library name.
|
||||
@@ -0,0 +1,8 @@
|
||||
library L {}
|
||||
contract C {
|
||||
function f() public pure {
|
||||
new L[](2);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError 1130: (63-64): Invalid use of a library name.
|
||||
Reference in New Issue
Block a user