Open
Description
Following up on #2428
This does not work:
asr: Transactions = Transactions(transactions=transactions, accounts=accounts)
s: Account = Account(name="OK")
asr.accounts.append(s)
with the error:
$ lpython --show-asr -I. process.py
semantic error: Only Name type and constant integers supported in Call
--> process.py:7:1
|
7 | asr.accounts.append(s)
| ^^^^^^^^^^^^^^^^^^^^^^
But this workaround works:
accounts: list[Account] = []
asr: Transactions = Transactions(transactions=transactions, accounts=accounts)
s: Account = Account(name="OK")
accounts.append(s)
Metadata
Metadata
Assignees
Labels
No labels