Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore[test]: add test for address members' names as struct fields #3527

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
24 changes: 24 additions & 0 deletions tests/functional/syntax/test_structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,30 @@ def get_y() -> int128:
def foo():
bar: C = C(a=1, b=block.timestamp)
""",
"""
struct X:
balance: uint256
codesize: uint256
is_contract: bool
codehash: bytes32
code: Bytes[32]

@external
def foo():
x: X = X(
balance=123,
codesize=456,
is_contract=False,
codehash=empty(bytes32),
code=empty(Bytes[32])
)

a: uint256 = x.balance
b: uint256 = x.codesize
c: bool = x.is_contract
d: bytes32 = x.codehash
e: Bytes[32] = x.code
""",
]


Expand Down