mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallows index access on contracts and libraries.
This commit is contained in:
committed by
Alex Beregszaszi
parent
97d3b88f65
commit
2d0daae796
@@ -0,0 +1,7 @@
|
||||
contract C {
|
||||
function f() view public {
|
||||
C[0];
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (52-56): Index access for contracts or libraries is not possible.
|
||||
@@ -0,0 +1,7 @@
|
||||
library C {
|
||||
function f() view public {
|
||||
C[0];
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// TypeError: (51-55): Index access for contracts or libraries is not possible.
|
||||
Reference in New Issue
Block a user