Skip to content

Unexpected invalid-return-type when using narrowed dict as argument to dataclass #1167

@jbree

Description

@jbree

Summary

I expect the return value to be properly typed with no errors, because following the if condition, res should be known to be a dict

https://play.ty.dev/caceacc9-cb4a-4193-b021-d2f9a8723ee3

Version

playground 8770b9550

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions