Disallows index access on contracts and libraries.

This commit is contained in:
Erik Kundt
2019-02-25 23:05:33 +00:00
committed by Alex Beregszaszi
parent 97d3b88f65
commit 2d0daae796
4 changed files with 17 additions and 0 deletions
@@ -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.