nac3core: codegen fix empty list llvm type #158

Merged
sb10q merged 1 commits from empty_list_llvm_type into master 2021-12-30 10:38:12 +08:00
Collaborator

Minimum code to produce the bug:

def f(a: list[bool]):
    pass
   
def run() -> int32:
	f([])

error:

Call parameter type does not match function signature!\n  %tmparrstr = alloca { i32*, i64 }, align 8\n { i1*, i64 }*  call void @__main__f.0({ i32*, i64 }* %tmparrstr)\n

This patch should fix this by giving empty lists correct llvm type.

Minimum code to produce the bug: ```python def f(a: list[bool]): pass def run() -> int32: f([]) ``` error: ``` Call parameter type does not match function signature!\n %tmparrstr = alloca { i32*, i64 }, align 8\n { i1*, i64 }* call void @__main__f.0({ i32*, i64 }* %tmparrstr)\n ``` This patch should fix this by giving empty lists correct llvm type.
ychenfo added 1 commit 2021-12-30 05:18:42 +08:00
sb10q merged commit 7193e3f328 into master 2021-12-30 10:38:12 +08:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#158
No description provided.