From 8370d85a2f146bd080e70385a1fbec30b881d8d8 Mon Sep 17 00:00:00 2001 From: tserg <8017125+tserg@users.noreply.github.com> Date: Sat, 17 Feb 2024 23:17:43 +0800 Subject: [PATCH] add old syntax test --- tests/functional/syntax/test_structs.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/functional/syntax/test_structs.py b/tests/functional/syntax/test_structs.py index 1b7846d53d..ff4d18a8cf 100644 --- a/tests/functional/syntax/test_structs.py +++ b/tests/functional/syntax/test_structs.py @@ -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}) - """, ] @@ -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}) + """, ]