-
Notifications
You must be signed in to change notification settings - Fork 48
Function with no return type passes with type signature #234
Copy link
Copy link
Open
Labels
blockingThese issues are blocking the checker being used in projectsThese issues are blocking the checker being used in projectsbugSomething isn't workingSomething isn't workingcheckingIssues around checkingIssues around checkingdiagnosticsrelated to outputting code errorsrelated to outputting code errorsevents-effectsRelated to operations and side effectsRelated to operations and side effects
Metadata
Metadata
Assignees
Labels
blockingThese issues are blocking the checker being used in projectsThese issues are blocking the checker being used in projectsbugSomething isn't workingSomething isn't workingcheckingIssues around checkingIssues around checkingdiagnosticsrelated to outputting code errorsrelated to outputting code errorsevents-effectsRelated to operations and side effectsRelated to operations and side effects
The following currently emits no diagnostics
The problem being that the only time return types are checked are around
returnstatements. Not implicitundefinedreturns.This should be fairly simple to fix. But there is probably a bit more to think about in terms of where and how the diagnostic is emitted. For example for the following
Maybe the diagnostic should be on the
elseclause?There are similar conditions for
whileetc