mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
5662ce3813
The CFE implementation of "why not promoted" functionality for non-promotion of `this` doesn't associate the context message with any location information, because there is no relevant location to cite. For example, the output can look like this: tests/language/why_not_promoted/this_error_test.dart:16:10: Error: Property 'isEven' cannot be accessed on 'int?' because it is potentially null. Try accessing using ?. instead. this.isEven; ^^^^^^ Context: 'this' can't be promoted. See http://dart.dev/go/non-promo-this The test runner assumes that all messages have a location, so it wasn't picking up on this context message at all. This CL avoids the problem by having the test runner associate any location-less context message with the error above it. (Note that the analyzer doesn't have this problem; all of its context messages have locations). Change-Id: Ied52daa8b0090f28617e7d3784233aa44dcc897a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195301 Reviewed-by: Bob Nystrom <rnystrom@google.com> Commit-Queue: Paul Berry <paulberry@google.com> |
||
---|---|---|
.. | ||
bin | ||
lib | ||
test | ||
tool | ||
.gitignore | ||
analysis_options.yaml | ||
pubspec.yaml |