Skip to content

'Never' is not checked for unreachability #10973

Description

@tinganho
functionfail(): never{thrownewError('oops');}functiontest1(){letstr: string;fail();str='helloworld';// No error. Should error with unreachable code.}functiontest2(){letstr: string;if(Math.random()>0.5){str='helloworld';}else{fail();}letstr2=str+'';// Error: str is used before being assigned. But should not error.}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Design LimitationConstraints of the existing architecture prevent this from being fixedWorking as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions