Skip to content

Better error message for semicolon on last line of function #8005

Closed
@kmcallister

Description

@kmcallister

Putting a semicolon on the last line of a non-void function produces

error: not all control paths return a value

which is fairly confusing. It would be good to have a special error message for this common case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsC-enhancementCategory: An issue proposing an enhancement or a PR with one.E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.P-mediumMedium priority

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions