trocher

Results 32 comments of trocher

Note that with commit https://github.com/vyperlang/vyper/commit/d48438e10722db8fc9e74d8ed434745e3b0d31cf The codegen no longer prevent the bug in certain case, leading contracts with side effect in `range` to compiles successfully: https://github.com/vyperlang/vyper/blob/cfda16c734ecddc170079817cd96b14e4fe24586/vyper/codegen/stmt.py#L268 ```Vyper interface A: def...

Also this one would currently compile even if it is really an edge case: ```Vyper @external def bar(x:address): for i in range(1 if raw_call(x, b'', revert_on_failure=False) else 2 , bound...

Yes I agree, in this case there is no ambiguity or anything, my concern was rather about the semantics of `range` as I understood that it must always be constant...

I don't see how it could lead to an issue in this specific case, it is really only about the semantics of `range` which changes and now becomes slightly more...

another example in case you want more tests there: ```Vyper @external def bar() -> (uint256, uint256, uint256): return (480, 0, 0) interface A: def bar() -> String[32]: nonpayable @internal def...

The following compiles although it should not I guess? main.vy: ```Vyper import lib1 import lib2 initializes: lib2[lib1 := lib1] initializes: lib1 @deploy def __init__(): for i:uint256 in range(2): if i...

The following compiles on master but not on this branch since the analysis performed assumes that, given a module A which initializes a module B with some dependency C (`initializes:...

Note: same behaviour for `self.nested_array.pop().append(1)` as found by @charles-cooper but probably not a bad thing that the compiler crashes given that both examples would lead to an invalid read/write

fixed by https://github.com/vyperlang/vyper/pull/3786