Skip to content

Commit d539780

Browse files
committed
Fix carg generation bug
1 parent aae9855 commit d539780

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/styx/backend/python/languageprovider.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,10 @@ def param_var_is_set_by_user(self, param: ir.Param, symbol: str, enbrace_stateme
292292
if enbrace_statement:
293293
return f"(not {symbol})"
294294
return f"not {symbol}"
295+
if len(param.body.value_false) == 0 and len(param.body.value_true) == 0:
296+
return "False" # Never emits anything (useless param)
297+
if len(param.body.value_false) > 0 and len(param.body.value_true) > 0:
298+
return None
295299
return None
296300

297301
def param_is_set_by_user(self, param: ir.Param, symbol: str, enbrace_statement: bool = False) -> str | None:

0 commit comments

Comments
 (0)