Skip to content

Narrowing causing Mypyc runtime type error #20750

@nickdrozd

Description

@nickdrozd

Have code that uses type alias ubiquitously:

type Count = int | Num

where Num is int-like. Num and int interact and coexist. Has been running fine compiled with Mypyc.

e64a84b has introduced some problem. Now getting TypeError: tm.num.Num object expected; got int.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions