Skip to content

Never return type is not respected in missing_return checks for opted out libraries  #42797

@jakemac53

Description

@jakemac53

This is causing some problems for google3, specifically string_scanner migrated the error method to return Never and removed the @alwaysThrows annotation. (see here).

This is causing a problem internally at at least one call site in the glob package, which is not opted in:

ERROR: <third party>/glob/lib/src/parser.dart:95
  This function has a return type of 'int', but doesn't end with a return statement. #missing_return

Target //<third party>/glob:glob failed Dart checks.

cc @leafpetersen @davidmorgan

Metadata

Metadata

Assignees

Labels

NNBDIssues related to NNBD Releaselegacy-area-analyzerUse area-devexp instead.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions