Commit Graph

11665 Commits

Author SHA1 Message Date
Sam Rawlins 843a31fe45 Prefer string interpolations; other small fixes for lints 2.0.0
Change-Id: Ie66c42ac738adbcf07d0b7c5ccc77e34975008c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-03-18 22:13:21 +00:00
Konstantin Shcheglov eb95543629 Run macro types phase.
The very first version, many improvements to be done later.

Change-Id: If78efba1ab0d06aaea6f3c7525fcd00a39c18459
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237768
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-18 20:22:41 +00:00
Sam Rawlins d5cc53a1b8 Prefer for-loop over forEach; other little fixes
These linter fixes help prepare analyzer for lints 2.0.0

Change-Id: Ic942fa367965edac479b917cbbb601b30da8b53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237766
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-03-18 03:37:47 +00:00
Konstantin Shcheglov e253d467ae Fix for reporting UNUSED_ELEMENT_PARAMETER when used via super-formal.
Change-Id: I334b2b30dd29ae61fb7fbf3bf2af8e68cf969a3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237767
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-18 02:14:38 +00:00
Brian Wilkerson ef00a01289 Remove an unused parameter from one of the test classes
Change-Id: I66b66816c8fec84bfdec6eafc8ce17f71361b879
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237743
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-17 22:24:37 +00:00
Konstantin Shcheglov f1a753a338 Don't look for .packages while creating Workspace.
Change-Id: I8903f21caad6d0920dc2dca8f2a20137540198b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237722
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-17 17:57:13 +00:00
Konstantin Shcheglov 592bfc0174 Remove newDotPackagesFile(), related from file_paths, context location / manager.
Change-Id: I0f3c067b47e4d0f6171b8a26d34fc173df983c29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237637
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-17 17:40:16 +00:00
Konstantin Shcheglov 073db61a4e Add implicit arguments for super-formal parameters during constant evaluation.
Change-Id: I1150ebfc9bcdad53ffb38504cff97c2ea9aea5cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237721
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-17 17:39:16 +00:00
Jens Johansen fd4e41a7af [parser-ish] Better errors on invalid unicode escapes
https://github.com/dart-lang/sdk/issues/48542

Change-Id: Icbdcc939a93c737914091c00aaefa3c4efb2dde0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-03-17 13:57:45 +00:00
Konstantin Shcheglov 963bd7c165 Add AnalysisContext.changeFile()
Change-Id: I42d215e872322cace019bc64f04a74d883e9849e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237628
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-17 00:33:34 +00:00
Konstantin Shcheglov e2f615fa9d Remove the temporary SummaryDataStore constructor.
Change-Id: Id14fc6502bb0885b6843748a1ed833656e1a2df9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237625
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-16 23:53:45 +00:00
Konstantin Shcheglov 5bd060484b Fix order of inference for super-formal parameters.
Change-Id: Ie98663d1788b14d4622e692b446756d8c1c9b763
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237629
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-03-16 20:31:04 +00:00
Konstantin Shcheglov eea52d35f8 Issue 48583. Inherit evaluationResult in DefaultSuperFormalParameterElementImpl.
Bug: https://github.com/dart-lang/sdk/issues/48583
Change-Id: I6217adb5d1e96d2fbb40e4033b9ed62025cd60ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237622
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-16 18:14:14 +00:00
Konstantin Shcheglov 1a1701c2b5 Build macro kernels.
They are not used yet.

Change-Id: I7849bf845f161f5c48e8ec9ded5900a3486148c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237483
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-16 16:55:14 +00:00
Paul Berry f58adc5dc3 Rework heuristic for "fixing" type parameters after downwards inference.
Sometimes the upwards inference phase of generic type inference is
capable of assigning a more specific type than the downwards inference
phase, but we don't want to use the more specific type due to Dart's
"runtime checked covariant generics" design.  For example, in this
code:

    List<num> x = [1, 2, 3];
    x.add(4.0);

Downwards inference provisionally considers the list to be a
`List<num>`.  Without this heuristic, upwards inference would refine
the type to `List<int>`, leading to a runtime failure.  So what we do
is "fix" the type parameter to `num` after downwards inference,
preventing upwards inference from doing any further refinement.

(Note that the heuristic isn't needed for type parameters whose
variance is explicitly specified using the as-yet-unreleased
"variance" feature, since type parameters whose variance is explicitly
specified don't undergo implicit runtime checks).

Previously, this heuristic was implemented in a kludgy way: we would
go ahead and gather type constraints during both the upwards and
downwards inference phases, and then just prior to choosing the final
type, if the downward constaints were sufficient to lock down the
type, we would discard the constraints from the upwardsr inference
phase.

This change simplifies the logic so that we figure out which
parameters to fix after the downwards inference phase, and simply stop
accumulating constraints for them.

This is a preparatory step towards implementing
https://github.com/dart-lang/language/issues/731, which will require
splitting type inference into more phases.

Change-Id: I0cc5774e61a5ace589ea0f45a20fbc1a67c8b940
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237381
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-15 22:00:22 +00:00
Paul Berry 8fbb5bbf5b Remove GenericInferrer.considerExtendsClause.
This logic allowed the analyzer to omit consideration of type
parameter bounds during execution of the `matchSupertypeConstraints`
method (which is used for mixin type parameter inference).  I added it
back in 2018 (https://dart-review.googlesource.com/c/sdk/+/44220) in
an attempt to fix #32353, however after I made the fix, additional
work by the front end team made it seem like I had probably
misunderstood the issue.  In any case, I've verified with both SDK
trybots and an internal presubmit that removing this logic doesn't
break anything, so I believe it's likely that the bug was later fixed
in a different (and presumably more correct) fashion.

I'm currently doing work on the analyzer's type inference logic, and
GenericInferrer.considerExtendsClause is complicating my efforts, so
it seems reasonable to remove it at this point.

Change-Id: Ia0a988c7297e1579c2e96f9fa886e280f47ab62e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237003
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-15 17:49:15 +00:00
Konstantin Shcheglov c4752d7f20 Include null suffix in Cider error verifier diagnostics.
Bug: https://buganizer.corp.google.com/issues/223932544
Change-Id: I860ee8b85a9ff6505df988df2ab50fe025d4a95e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237402
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-15 16:49:27 +00:00
Konstantin Shcheglov 111101039b Don't create default constructors for mixins.
Mixins are not classes, they cannot be instantiated.

Change-Id: Ib91b53046fead331886e4099625371016c4b2ba8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-15 15:48:21 +00:00
Konstantin Shcheglov 6e1f4a7642 Enable null safety by default in Cider tests.
Change-Id: If9839eaed89adeb26bb4249e6e0fe9dda0ce22e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237260
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-15 15:14:39 +00:00
Konstantin Shcheglov 935faa6c8a Return potentially affected files from applyPendingFileChanges()
Change-Id: I7a9410a5ba8a2cdbc2fd44fb5e25c311569696ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237180
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-15 00:32:49 +00:00
Konstantin Shcheglov 189cf35a96 Add ClassElementImpl.isMacro
Change-Id: Icf59c2e701c2008759f863c97fff22088abc1e54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-14 20:45:49 +00:00
Konstantin Shcheglov 41b3e0abcc Make 'content' required in ResourceProviderMixin.newFile()
Change-Id: Id697b0736b95a913c31247a66425027852f1ddc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-14 17:31:48 +00:00
Paul Berry 7642021418 Verify invariant of TypeConstraintGatherer.trySubtypeMatch.
Documentation comments claim that if the match fails, the set of type
constraints is unchanged.  From code inspection, I believe this is
correct, but it's non-trivial to verify, so I've added a line to
type_constraint_gatherer_test.dart to double check it.

Change-Id: I9587922ca90fe9bbd51217906a4f4bd76047c777
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237002
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-14 16:42:15 +00:00
Konstantin Shcheglov b66e349926 Extract AbstractElementsTest, simplify a bit.
Change-Id: I56646688729a326573f9dc56455c694097fd7d93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236921
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-14 16:10:28 +00:00
Paul Berry 1ffba32609 Rework type inference logic to avoid redundant constraint gathering.
Previously, the analyzer would perform downwards and upwards inference
using separate GenericInferrer objects.  This meant that any
constraint gathering work performed during downwards inference had to
be repeated during upwards inference.

This change avoids the extra work by using a single GenericInferrer
object for both downwards and upwards inference.  It also cleans up
the API for GenericInferrer a bit.

Change-Id: Idc5deed96c18ffc89aeb8ba4e5e95942843dae11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236660
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-14 15:05:18 +00:00
Paul Berry 0d1cafe1db Don't check consistency if an exception occurs during analysis.
A consistency check is not necessary in the event of an exception,
because we aren't returning a value anyhow.  And it's guaranteed to
fail, because the AnalysisDriver clears the context when an exception
occurs (see AnalysisDriver._clearLibraryContextAfterException).  This
is harmful, because the InconsistentAnalysisException covers up the
original exception, making debugging much more difficult.

Change-Id: Iaab1bdf1a32c1e261cef97b8749a2c5057d9b11c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236780
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-14 12:17:38 +00:00
Konstantin Shcheglov 8fc70b1907 Fix augment/macro keyword mixup, tests.
Change-Id: Id9a60f263af9dec4f7e0eacbb1a9b2ae98b77afb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-10 22:16:17 +00:00
Konstantin Shcheglov c60cb96251 Run AbstractResynthesizeTest in package:test
Change-Id: I90c1e55bfccc94dcc12ed4ae310faa22c1a22da1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236763
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-10 22:15:35 +00:00
Konstantin Shcheglov 13c0a4c2c0 Enable 'macros' experiment in tests.
Change-Id: Ib5593b12f13c23cc9a703d80cf50bbec5608e53f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236702
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-03-10 20:08:21 +00:00
Konstantin Shcheglov 5a31381f8e Update VarianceTest to use AST dump.
Change-Id: Id06b96b2d0be1e0772c86f09e6f03fc8c5736a9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-10 19:54:56 +00:00
Konstantin Shcheglov f8a42a28de Remove CodeLinesProvider from ResolvedAstPrinter.
We don't use this feature.

Change-Id: Ic6779554754a5f83fedb7b5973f27d57fb49b72d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236700
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-10 19:04:45 +00:00
Konstantin Shcheglov 5fa65048c1 Use file_paths.pubspecYaml instead of 'pubspec.yaml' literal.
WDYT ?

Change-Id: I6677b2237e0558c74bb11073dcfb44d7b672323f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-10 19:03:55 +00:00
Konstantin Shcheglov 582bc7e8b0 Replace assertInstanceCreation() with AST dump.
Change-Id: If712679b67cef90c238bd55203547f3344cd0526
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-10 18:15:55 +00:00
Paul Berry 76bbd199a4 Fix analyzer implementation of the "variance" feature.
It had bit rotted slightly: we were not properly accounting for
variance when gathering type inference constraints from the comparison
of two interface types.

Also, some of the tests needed to be updated to account for follow-on
errors.

Change-Id: Ife9feae3e2180a179ebc8503751690789dc1483e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235941
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-10 15:56:35 +00:00
Konstantin Shcheglov 1a3eefd699 Stop using newDotPackagesFile() in analyzer/.
Change-Id: I3a150895e4aa8822317bb1a9225033c787b4ecd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236445
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-10 05:27:45 +00:00
Konstantin Shcheglov fc2ebe7310 Use the same writeType() for elements as for AST.
Change-Id: Ia29e9c86cbb34d0a92c76ca390927c1ca6661d34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236443
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-10 01:32:16 +00:00
Danny Tuppeny 0de43ae5f7 [analysis_server] Make CompilationUnitElement.lineInfo non-nullable
Change-Id: Ia42e2a2fd153b5af167588b9d4d473d1f998a67b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-10 00:19:15 +00:00
Konstantin Shcheglov c13e95d6dc Use explicit library for summary export tests.
Change-Id: I9dc09a05937d7c347648c04faa38a06d343a83a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2022-03-09 23:45:25 +00:00
Konstantin Shcheglov f9ed80f7a5 Include DartType.alias into AST dump.
Change-Id: I7b4d7351ac219edce0c89b45220a52f37e6dce6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236360
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-09 22:26:34 +00:00
pq c3e42e71bb add mock unawaited
Change-Id: I3df9342779f95a2e160b56613ab3f31068694a0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2022-03-09 21:41:34 +00:00
Konstantin Shcheglov 98fde68b2b Replace SummaryDataStore default constructor.
Change-Id: If34d2365ecd2a643a40d660250bf2d5936ab953f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236305
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-09 21:33:35 +00:00
Konstantin Shcheglov 5ffba0a660 Remove unnecessary code for enum constants from AstBuilder, completion.
With https://github.com/dart-lang/sdk/issues/48380 fixed, we can simplify.

Change-Id: Ic453fe9e86af2f6cb437ff016a9b3786959b05d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236302
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-09 21:07:44 +00:00
Konstantin Shcheglov 4ffb83acaf Get non-nullable DartType in _typeStr().
Change-Id: I40a5ed56079a6c3908c1a7cdf7cd796015660eef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236303
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-03-09 20:26:05 +00:00
Konstantin Shcheglov 44806b2e47 Don't report VALUES_DECLARATION_IN_ENUM for static setter.
See https://github.com/dart-lang/co19/pull/1312

Change-Id: Ie535a826a2997c45344486febbb8cc35a748496c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236300
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-09 19:13:34 +00:00
Konstantin Shcheglov 1693908268 Apply file changes between (not during) other operations.
This would be a breaking change, so for now it is disabled, but
the method `applyPendingFileChanges()` can be added, and the clients
will call it to be ready for the switching the flag.

Only clients that call methods like `changeFile` have to await applying
the file changes. Other clients can continue using synchronous
`currentSession`.

Change-Id: I0f8d4cc874f485776f611790f6c80fd7e07c8051
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236041
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-09 18:16:45 +00:00
Jens Johansen f40d76d360 [parser] Recover missing () for enum constant with type arguments or dot
Fixes https://github.com/dart-lang/sdk/issues/48380

Change-Id: I4f6fd7311c46ad45ccce5bf6b97b40932a457851
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234360
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-03-09 12:40:35 +00:00
Danny Tuppeny 9c0689a887 [analysis_server] Add code snippet for main functions
Change-Id: Ie74f92ab321d426897163f7f33b94828c9e0f99a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235240
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-03-08 20:18:04 +00:00
Konstantin Shcheglov ed2344eba9 Replace remaining assertMethodInvocation() with AST dump.
Change-Id: I462ae1d8dd82cdd406999a8cd23ce86355b57b92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235772
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-08 16:12:34 +00:00
Konstantin Shcheglov d627e85229 Deprecate 'astFactory'.
Change-Id: I5f1e47328e92cab368d5a8eb9f77f0ea45649b1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235771
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-08 07:00:03 +00:00
Konstantin Shcheglov 25f8786fb3 Deprecate and replace more sync methods of AnalysisDriver.
Change-Id: I5e10b7233841a9601315a6f04c1620d90daf6f67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-07 23:53:23 +00:00