Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Issue 2609993002: Use the function name as the location for a missing return error. (Closed)

Created:
3 years, 11 months ago by Bob Nystrom
Modified:
3 years, 11 months ago
Reviewers:
Jennifer Messerly
CC:
reviews_dartlang.org
Target Ref:
refs/heads/master
Visibility:
Public.

Description

Use the function name as the location for a missing return error. Previously, it was using the entire function node, including it's body, which makes for a gratuitously large amount of red squiggles. :) This uses the function's name instead. As a side effect, the error now appears a little later for a getter: get foo => ... ^^^ Where before it was: get foo => ... ^^^^^^^^^^^^^^ I tried putting the span on "get" instead in this case because that's closer to where the return type should go, but I think the name looks a little better because that's the name mentioned in the error message too. R=jmesserly@google.com Committed: https://github.com/dart-lang/sdk/commit/da16354b1bf7cf86d9ab3aae9fa0e98633b327fe

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -7 lines) Patch
M pkg/analyzer/lib/src/generated/error_verifier.dart View 5 chunks +9 lines, -6 lines 0 comments Download
M pkg/analyzer/test/src/task/strong/checker_test.dart View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 5 (2 generated)
Bob Nystrom
3 years, 11 months ago (2017-01-03 21:01:39 UTC) #2
Jennifer Messerly
LGTM, much nicer!
3 years, 11 months ago (2017-01-04 02:01:22 UTC) #3
Bob Nystrom
3 years, 11 months ago (2017-01-04 18:18:15 UTC) #5
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
da16354b1bf7cf86d9ab3aae9fa0e98633b327fe (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698