Skip to content

Function declared with return type should emit error when nothing return #475

Closed
@MaxGraey

Description

@MaxGraey

EDITED

This examples successfully compile:

export function foo(): i32 { return; }

But expected:

error TS2355: A function whose declared type isn't 'void' must return a value.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions