New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer's "missing_return" highlights the wrong source span #35607

matanlurey opened this Issue Jan 9, 2019 · 0 comments


None yet
1 participant
Copy link

matanlurey commented Jan 9, 2019

Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21)

screen shot 2019-01-08 at 10 26 25 pm

... emits ...

	"resource": "/<REDACTED>/auth.dart",
	"owner": "dart",
	"code": "missing_return",
	"severity": 2,
	"message": "This function has a return type of 'Widget', but doesn't end with a return statement.",
	"source": "dart",
	"startLineNumber": 55,
	"startColumn": 3,
	"endLineNumber": 55,
	"endColumn": 34,
	"tags": []

If I remove @override, it applies correctly. If I add a return type explicitly, say Widget, Widget is underlined. This makes it seem like the hint is incorrectly choosing the first element in the method declaration, instead of the method name itself, to highlight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment