Skip to content

TypeInference bug in ilist.map #579

@weinbe58

Description

@weinbe58

Something is going wrong with type inference on the following example:

from kirin.prelude import structural
from kirin.dialects import py, ilist


@structural(typeinfer=True, fold=False, no_raise=False)
def main(n):
    def map_func(i):
        return n + 1
    
    return ilist.map(map_func, ilist.range(4))

main.print()

type of the collection in ilist.map is bottom. Seems to be somewhat related to type inference of func.Lambda but I am not sure.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions