The fasta parser sometimes "drops" unexpected tokens during recovery.
When this happens, the dropped or skipped token is not reported to
the listeners, and thus does not become part of the analyzer's AST.
These tokens are still in the token stream, but will not be found
by the existing CompletionTarget mechanism.
For example, the fasta parser parses
'if (v i) {}' as 'if (v) {}' and drops the 'i' token.
This CL introduces a new CompletionTarget.droppedToken field.
If a keyword or identifier has been dropped by the parser,
but overlaps the code completion offset, then that token
is placed into this new field.
In the example above, when code completing the 'i',
the CompletionTarget will now be
containingNode = '(v)'
entity = ')'
droppedToken = 'i'
Change-Id: I15e43529ab4a72de9500c521be278fa13ae68d99
Reviewed-on: https://dart-review.googlesource.com/31285
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Adding a dependency file triggers resolving its file path using the
service isolate. However, in the kernel flow, gen_snapshot does not
initialize the service isolate. This does not seem to cause any problems
on Mac and Linux, but flutter crashes on Windows. On Linux and Mac,
the behaviour with this change matches the current behavior.
The correct dependency file to add to the dependencies file in the kernel
flow is the app dill file passed as input to gen_snapshot. But, this would
call for specifyint the application sources as the dependency for the app
dill file itself somewhere. We can revisit this and fix it up correctly if
needed. For now, this change unblocks the Windows builds.
Change-Id: Ic22a7ccc96548e005b85308c3baaeedb860f4dae
Reviewed-on: https://dart-review.googlesource.com/31280
Commit-Queue: Siva Chandra <sivachandra@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Also allows us to more generally compare annotations in multi-file tests.
Bug:
Change-Id: I2f4ac34b918cc80400ebc417dfcc2caf56457ac2
Reviewed-on: https://dart-review.googlesource.com/30923
Commit-Queue: Emily Fortuna <efortuna@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
function subtype test.
No behavior change, only make code easier to read in strong vs non-strong modes.
Change-Id: I44b34ff5c9680270014db83633eb2ef1ed60491e
Reviewed-on: https://dart-review.googlesource.com/31284
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
This is important on Windows, where file path has to be massaged before processed as uri.
Bug:dartbug.com/31706
Change-Id: Ifa91d4b99ed443f4c3409a343b797211f578403d
Reviewed-on: https://dart-review.googlesource.com/31281
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
At and after the meeting that Anders called in AAR today we discussed
the list of directories that we would need. These came up:
generalized void
instantiate to bound
noSuchMethod forwarding
super-bounded types
I combined super-bounded types and instantiate to bound into one
topic, since they are so interwoven.
I also noted that we have more features coming up, even though we have
not discussed them much recently, and one of them will need a number
of tests: optional const/new. So I created new test directories for
these five topics, and added a short README.md to indicate their
purpose.
Change-Id: I17a407073d2dbcbccce0bfbd321cb01365d4b9ee
Reviewed-on: https://dart-review.googlesource.com/31200
Reviewed-by: Anders Sandholm <sandholm@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
One language test "passes" when we no longer complain about the mixin issue.
Bug:
Change-Id: I5aeb4ead7d3faf6ec756eeb11fecc20bcfb4c16e
Reviewed-on: https://dart-review.googlesource.com/31260
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This solves some arcane issues with Fuchsia's GN complexities,
explained further in the comments. It obviates "copy_dylibs".
Change-Id: If1b26bfa73d5167550d2217258fa074b9dacade9
Reviewed-on: https://dart-review.googlesource.com/30924
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
This bump is primarily to remove the dependency on scheduled_test. (The
dependents only include barback, shelf_static, and watcher.)
Change-Id: I1e40da2798a539d596b99688150d74934a0626e4
Reviewed-on: https://dart-review.googlesource.com/30980
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Report error when super is used as an expression outside
an initializer. Consolidated some error messages.
Change-Id: Iafaeeeff8a4b72f941925cefcbc832ba47f02a79
Reviewed-on: https://dart-review.googlesource.com/23360
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
This should prevent the bots from running out of disk space.
Change-Id: I3ca7794f8006f616473cf02c62f000a4c44d5b36
Reviewed-on: https://dart-review.googlesource.com/31120
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
This updates the KeywordContributor for use with the fasta parser
and cleans up several code completion tests by introducing
a 'usingFastaParser' flag.
Change-Id: Ife2d945065c23ccd9f2d8e85e5c24a6b956c75ae
Reviewed-on: https://dart-review.googlesource.com/30902
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Change-Id: Ic9d61a19d03ff537d58fa378d992e02de903bad8
Reviewed-on: https://dart-review.googlesource.com/30921
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This will speed up cross-builds.
TO-660
Change-Id: Idb1bf8839ffc3443ff620fbe94b733fe71d6bf84
Reviewed-on: https://dart-review.googlesource.com/30901
Reviewed-by: Siva Annamalai <asiva@google.com>
Dart VM will now call the time service to get the UTC offset.
Change-Id: Iec5f1a375d1fbc00c534eed10c8f1ba6b01e87a2
Reviewed-on: https://dart-review.googlesource.com/20824
Reviewed-by: Zach Anderson <zra@google.com>