Skip to content

Commit

Permalink
add old syntax test
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Feb 17, 2024
1 parent 3e661a1 commit 8370d85
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions tests/functional/syntax/test_structs.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,15 +422,6 @@ def foo():
""",
InstantiationException,
),
# valid syntax in versions <0.4.0
"""
struct A:
x: int128
a: A
@external
def foo():
self.a = A({x: 1, y: 2})
""",
]


Expand Down Expand Up @@ -566,6 +557,15 @@ def get_y() -> int128:
def foo():
bar: C = C(a=1, b=block.timestamp)
""",
# backwards compatibility for vyper <0.4.0
"""
struct A:
x: int128
a: A
@external
def foo():
self.a = A({x: 1})
""",
]


Expand Down

0 comments on commit 8370d85

Please sign in to comment.