Skip to content

infer Never return type from Never function called in body #1483

@KotlinIsland

Description

@KotlinIsland

Description

Code sample in basedpyright playground

def f1(): # -> Never
    raise NotImplementedError

def f2(): # -> Never
    while True:
        pass

def f3(): # -> None
    f1()
    f2()

Metadata

Metadata

Assignees

No one assigned

    Labels

    type checking / lintingissues relating to existing diagnostic rules or proposals for new diagnostic rules

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions