Skip to content

Commit 1a206bf

Browse files
committed
Add test for augmenting ret and assign in block
1 parent d892b0f commit 1a206bf

4 files changed

Lines changed: 4 additions & 0 deletions

File tree

tests/resource/valid/definition/assign_with_nested_if.mamba

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
def x := 20
22
def a: Int := if x > 10 then
33
if x > 30 then
4+
print("string")
45
x + 1
56
else
67
x - 1

tests/resource/valid/definition/assign_with_nested_if_check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
x: int = 20
22
if x > 10:
33
if x > 30:
4+
print("string")
45
a = x + 1
56
else:
67
a = x - 1

tests/resource/valid/definition/function_with_nested_if.mamba

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
def f(x: Int) -> Int =>
22
if x > 10 then
33
if x > 30 then
4+
print("string")
45
x + 1
56
else
67
x - 1

tests/resource/valid/definition/function_with_nested_if_check.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
def f(x: int) -> int:
22
if x > 10:
33
if x > 30:
4+
print("string")
45
return x + 1
56
else:
67
return x - 1

0 commit comments

Comments
 (0)