Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tests/parser/syntax/test_for_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ def foo():
for i in range(x, x + 10):
pass
""",
"""
interface Foo:
def kick(): nonpayable
foos: Foo[3]
@external
def kick_foos():
for foo in self.foos:
foo.kick()
""",
]


Expand Down
2 changes: 2 additions & 0 deletions vyper/codegen/types/convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ def new_type_to_old_type(typ: new.BasePrimitive) -> old.NodeType:
return old.BaseType("bool")
if isinstance(typ, new.AddressDefinition):
return old.BaseType("address")
if isinstance(typ, new.InterfaceDefinition):
return old.InterfaceType(typ._id)
if isinstance(typ, new.Bytes32Definition):
return old.BaseType("bytes32")
if isinstance(typ, new.BytesArrayDefinition):
Expand Down
1 change: 1 addition & 0 deletions vyper/semantics/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
TupleDefinition,
)
from .user.event import Event
from .user.interface import InterfaceDefinition
from .user.struct import StructDefinition
from .value.address import AddressDefinition
from .value.array_value import BytesArrayDefinition, StringDefinition
Expand Down