Commit Graph

3170 Commits

Author SHA1 Message Date
Konstantin Shcheglov 143fe67673 Make fields in CompilationUnitElementImpl final and/or non-nullable.
Change-Id: I604ad776196fa90bccf2ba06fa282fa0e7979d18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-25 01:20:19 +00:00
Sam Rawlins ab22a8dd8c Avoid single cascades, unnecessary interpolations, and exposing private types
* Make `MicroContextObjects` constructor private, which is not used
  outside the library.
* Remove unused `analysisContext2` constructor parameter.
* Make `tryMatchSubtypeOf` private, which requires a parameter of
  private type.
* Make `_FileStateFiles` public, as it is used outside the library.
* Return empty for void-typed functions.

Change-Id: If67a69effdbbaed2eb364788e52eeb60270a0c19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237855
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-03-21 18:12:47 +00:00
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
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 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 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
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
Paul Berry 1cdfaa8587 Consolidate type inference logic for invocations.
Moves all of the analyzer's type inference logic for invocations into
a single `resolveInvocation` method, defined on an abstract base class
`InvocationInferrer`.  There are concrete derived classes to
specialize this logic for all of the types of AST nodes require this
sort of inference (Annotation, ExtensionOverride,
FunctionExpressionInvocation, InstanceCreationExpression,
MethodInvocation, RedirectingConstructorInvocation, and
SuperConstructorInvocation), and the special logic for each node type
is slotted into the core algorithm using virtual dispatch.

In addition to making the code more maintainable by reducing code
duplication, this change paves the way toward modifying the core
algorithm to allow inference information to flow between arguments in
a generic function call
(https://github.com/dart-lang/language/issues/731).

Also partially addresses #48500 (Expression.staticParameterElement
sometimes points to a synthetic element).

Change-Id: I82788d58a62b6555589da16163317b6bbddd53c1
Bug: https://github.com/dart-lang/language/issues/731, https://github.com/dart-lang/sdk/issues/48500
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234864
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-06 15:07:42 +00:00
Danny Tuppeny 1e9fb81697 [analysis_server] Make CompilationUnit.lineInfo non-nullable
Change-Id: Ib628751a14dc3257cf7325432ab20f2bdb9d6f3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234290
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-03 06:59:00 +00:00
Paul Berry 26abf4cae2 Test cases to illustrate #48500
Bug: https://github.com/dart-lang/sdk/issues/48500
Change-Id: I237e44d33cca1d2fe63c205e8bd3dcd775bf079f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235062
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-03-03 05:53:10 +00:00
Konstantin Shcheglov fd885fd309 Prepare for enabling language features by default.
See https://dart-review.googlesource.com/c/sdk/+/234704

Change-Id: Ia3c72d787aa886df2566d7a852c8d04d20e95490
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-01 23:41:28 +00:00
Konstantin Shcheglov ac9de46499 Share FeatureSets for analyzer tests.
Change-Id: Ibe2655ed43af3cab632d6e4506f2366c1bfbbc27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234803
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-03-01 21:13:38 +00:00
Konstantin Shcheglov 39a3736165 Issue 48393. Fix DartObjectImpl.validWithUnknownValue() for dynamic.
Bug: https://github.com/dart-lang/sdk/issues/48393
Change-Id: I5a9386bd343d1c7a18178a0c5ed2093b160cb1d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234624
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-28 21:11:11 +00:00
Johnni Winther fa05359f2f [cfe] Support augmentation library imports
This adds support for the `import augment <uri>` import syntax when
the 'macros' experiment is enabled.

The CL also include propagation of the augment modifier on class methods
which was missed in a previous CL.

Change-Id: Ic843e7e34559bcac728c810590f34b727b5f7090
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234401
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-28 11:42:34 +00:00
Konstantin Shcheglov b1af9288ea Evaluate enum constants and report errors.
Change-Id: Ie3e307ae667cf5e0679a9750047b81ca66c3323c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-23 22:15:22 +00:00
Johnni Winther cd41e43c48 [parser] Support 'augment' as a built-in identifier for augmentation libraries
This changes the way the 'augment' modifier is handled in the parser.
Instead of being special cased for class declarations, it is now a
built-in identifier recognized only when the scanner is configured to
support augmentation libraries.

The change supports the used of the 'augment' modifier on not only
class declarations but also mixin and member declarations, as needed
for supporting macros.

Change-Id: I2679d198dea360900cfc478fae9c1660702a8a02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233887
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-23 16:17:42 +00:00
Chloe Stefantsova c12238d3ac [cfe] Allow typed super parameters
Part of https://github.com/dart-lang/sdk/issues/47525

Closes https://github.com/dart-lang/sdk/issues/47741
Closes https://github.com/dart-lang/sdk/issues/48444
Closes https://github.com/dart-lang/sdk/issues/47951

Change-Id: If9aadd996414df5091fc667a7202aafa9a0213db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233889
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-02-23 13:10:33 +00:00
Paul Berry 77a4d88c06 Properly handle implicit .call tearoff on RHS of assignments.
Previously, when inserting an implicit `.call` tearoff on the RHS of
an assignment, both the analyzer and the CFE failed to properly
propagate the type of the tearoff to the static type of the assignment
expression.  This resulted in a soundness bug for compiled programs.

Fixes #48409.
Fixes #48410.

Bug: https://github.com/dart-lang/sdk/issues/48409, https://github.com/dart-lang/sdk/issues/48410
Change-Id: I489f38bd7cac4ebadd3746ec32c1ef0f73e18169
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233640
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-21 16:38:51 +00:00
Johnni Winther 2435848b13 [parser] Support 'augment' modifier on class declarations
This adds support for the 'augment' modifier on class declarations
needed for the static meta-programming prototype.

Change-Id: Iadd11f766a195076405f2803b2092199caf1ea8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233180
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-18 09:39:23 +00:00
Konstantin Shcheglov 60b428e2b1 Deprecate superclass2, mixinTypes2, etc.
Change-Id: Ieaaeab57930cb93f5b6b1323efe63c3395b79993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232742
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-17 02:20:42 +00:00
Konstantin Shcheglov 09d3beb5ab Rename analyzer/ tests to WithoutNullSafety.
Change-Id: Id9d500b4970ec84ebaad6c2e4000464f95896d1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232234
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-10 04:21:59 +00:00
Konstantin Shcheglov 4e2dc38e0e Report CONST_WITH_NON_CONSTANT_ARGUMENT for enums.
Bug: https://github.com/dart-lang/sdk/issues/48237

Change-Id: Iffde67714dcea7b022b22a149b573dd3e26668b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232132
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-09 15:53:27 +00:00
Nate Bosch 33e174084a Replace Uri.scheme == with Uri.isScheme
Use `hasScheme` in place of comparing against the empty string, and
`isScheme` to compare against all other schemes.

TEST=No behavior changes.

Change-Id: Ifc9fd13c6cf37933ebd4a754c4b500dedbcb291b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231185
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-02-08 21:38:57 +00:00
Konstantin Shcheglov 7daffa9e47 Remove hasAssignmentLeftResolution, check assignment targets are not resolved.
Change-Id: Iae73b698b696257298f06c581cb80367f4309816
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232034
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-08 16:16:16 +00:00
Ilya Yanok 3c16fdd3b0 Fix type inference for yield* inside method w/o declared return type
This was broken after
https://dart-review.googlesource.com/c/sdk/+/230948, the example would
be

```dart
class A {
   m() sync* {
     yield* [1];
   }
 }
```

Inferred type for expression in `yield*` statement is
`List<FutureOr<dynamic>>` after the above CL, while I'd expect it
to be `List<int>`.

The change modified the behaivor while passing the imposed
return type a bit: `InferenceContext.setType` resets the type to `null`
if it's `dynamic`, while the logic that passes the type down explicitly
doesn't do that. My change restores the behavior of resetting the
imposed type to `null` if it's `dynamic`.

Interestingly enough, this is not a problem for function declarations:
`FunctionExpressionResolver.resolve(FunctionExpressionImpl)`
has special clause that resets the imposed type to null. But
for reasons I don't understand `FunctionExpressionResolver` is
used for function declarations but not for method declaration.

Change-Id: I63cfde01f067c25442afed64843861d09c7474a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231702
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
2022-02-07 19:34:18 +00:00
Konstantin Shcheglov 206e46a011 Test for enum values evaluation.
Change-Id: Ib4d120530a44d099d90e674930f94e7af08371f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231534
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-04 00:18:56 +00:00
Paul Berry 58a42b5cfc Stop storing contextual information on FunctionBody nodes.
Instead of using InferenceContext.getContext and
InferenceContext.setType to associate type inference information with
VariableDeclaration nodes, we pass the information on the stack using
a new FunctionBodyImpl.resolve method.  This should be more efficient
for two reasons: it avoids a map lookup, and it avoids the double
dispatch traditionally associated with calling a visitor.  It should
also make the code easier to reason about (since it makes the flow of
data in the type inference process more explicit).

This is part of a larger effort to elimiate the use of
InferenceContext.getContext and InferenceContext.setType entirely.

Change-Id: I8a3f3be940acdcd0a2c4ad8ec37b41bafe25c952
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230948
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-02 16:04:39 +00:00
Jens Johansen c2b2aa5b9a [parser] Add beforeSynthetic to Synthetic*
Follow-up to https://dart-review.googlesource.com/c/sdk/+/205799

Change-Id: I620bf4548095d0597b89e4b6305c2301bcbed144
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230242
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-01-28 08:54:13 +00:00
Konstantin Shcheglov 4d3080a47a Extract DartObjectPrinter, basic text for enum values.
Change-Id: I328cb731215f3cecacb2d6e41ed1975bb751eb9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-01-27 18:04:04 +00:00
Danny Tuppeny d2b568b04a [analysis_server] Add context message containing location of super member for invalid_override
Fixes https://github.com/dart-lang/sdk/issues/47936.

Change-Id: Ibc39691df1093a7940a0a5289097d44de3fcdc3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-19 19:46:06 +00:00
Konstantin Shcheglov 506dd07716 Remove unused portion of java_core.
Change-Id: If0b2b35ca01d5c4f77f22440da0bae3fea903282
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226340
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-04 20:58:42 +00:00
Konstantin Shcheglov 40e8e7ce5e Remove java_io.dart and tests.
Change-Id: I4e3bc83896be2469c183fa0481d0c49fc79a8ce9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-04 19:11:30 +00:00
Paul Berry d48e475956 Rewrite static type analyzer tests using the new PubPackageResolutionTest style.
Using this style makes the tests more robust to refactoring the
analyzer, since the tests exercise the analyzer in end-to-end fashion.

Bug: https://github.com/dart-lang/sdk/issues/44522
Change-Id: Ia036d5d32621019841b5a5cf44f43ab8761f98aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224621
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-01-04 18:15:15 +00:00
Konstantin Shcheglov 2766add19a Partial fix for parsing explicitly typed super formal parameters.
I need at least this much to cover a few test cases in the analyzer,
but it might be not the best implementation. It seems to not break
anything, so maybe we can land this for now, while we are waiting for
the better fix of the referenced issue?

Bug: https://github.com/dart-lang/sdk/issues/47951
Change-Id: I428e32f4435b3229cb2dc41678182cde0e2f98e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226200
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-04 16:19:06 +00:00
Johnni Winther 8cdc0e6474 [analyzer,cfe] Add support for macro class
This CL add the 'macros' experiment and adds support for the `macro`
modifier on class declarations. This is part of the prototyping of
the static meta-programming feature.

Change-Id: Ie4b8c5443fda3813307ea076c315baad6a90c3e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224205
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-12-21 10:45:59 +00:00
Konstantin Shcheglov 08460e7af5 Rewrite NodeReplacer tests using parsed AST.
Change-Id: I3f6fc607a2ef71bf31aa9718794fb910cf3dd0e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-18 00:32:13 +00:00
Konstantin Shcheglov 04ddb28213 Fix parsing simple SuperFormalParameter(s).
Change-Id: I57b03798f75685ef3080b9f5547aac6f3192198e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224640
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-12-16 22:38:59 +00:00
Paul Berry 64939f59b9 Rewrite element resolver tests using the new PubPackageResolutionTest style.
Using this style makes the tests more robust to refactoring the
analyzer, since the tests exercise the analyzer in end-to-end fashion.

Change-Id: I7038e542109cb6556f3db190d7a0e527f32e1788
Bug: https://github.com/dart-lang/sdk/issues/44522
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-12-16 16:18:39 +00:00
Paul Berry 9ca2bcdcaf Use the full ResolverVisitor when testing ElementResolver and StaticTypeAnalyzer
I'm experimenting with refactoring some code in a way that changes the
interface between the ResolverVisitor and the two visitors that
invokes (ElementResolver and StaticTypeAnalyzer).  The division of
responsibility among these three classes is not very well-defined or
consistent due to their highly coupled nature and the fact that they
are always invoked in tandem.  This makes it difficult to refactor
them without causing churn on the ElementResolver and StaticAnalyzer
unit tests.

This change reduces the churn by changing the ElementResolver and
StaticAnalyzer unit tests to invoke the full ResolverVisitor; this
makes the interface among the three classes a fully private
implementation detail, so that we can adjust it without causing any
test breakages.

Change-Id: Ice4c0d98138e59bac52ed67eecf3ee535ca75e1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223141
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-12-14 18:30:54 +00:00
Konstantin Shcheglov 7f07c9d3ff Replace Predicate with Function, remove java_engine.dart
Change-Id: If3ac722f855106c2350c3217c8e7d7ba69dfbaed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-12 03:32:31 +00:00
Konstantin Shcheglov 95644dcde5 Stop using the remaining methods of StringUtilities.
Change-Id: I099c4f79f2cd5dede474412e72d6d53ef555deff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223300
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-11 18:50:01 +00:00
Konstantin Shcheglov 932bd93fae Replace StringUtilities.printListOfQuotedNames() with quotedAndCommaSeparatedWithAnd.
Change-Id: I8579b2037999967b865f4ebaa2a7ff67b05d2a94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223240
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-10 21:09:40 +00:00
Konstantin Shcheglov 95a3d3cab1 Remove unused methods from StringUtilities.
Change-Id: I986dab76cff97007a2c9e513da9b6da8fbfc41de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/223200
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-10 19:39:00 +00:00
Paul Berry c5c480895d Add a test case to make sure the resolver can handle an ImplicitCallReference node.
Change-Id: Ife1115c23c75f3bdbfc738bcf12da5b8ac8ace41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-12-09 17:55:29 +00:00
Chloe Stefantsova 7359264b13 Revert "[parser] Add support for typed super-initializer parameters"
This reverts commit fc9f7e3372.

Reason for revert: breakages in ternary operators involving super access.

Original change's description:
> [parser] Add support for typed super-initializer parameters
>
> Part of https://github.com/dart-lang/sdk/issues/47525
>
> Closes https://github.com/dart-lang/sdk/issues/47741
>
> Bug: https://github.com/dart-lang/sdk/issues/47741
> Change-Id: I0558b33aa43cc73e67ca0d17bd5c8ec1afdc526f
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221634
> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/47741
Change-Id: I565faadeb0776a089853dc2264af50b069e16056
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222301
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2021-12-07 18:52:49 +00:00
Konstantin Shcheglov abd1dc8465 Extend AST for enhanced enums.
Change-Id: Ief64e4ba23311543702e7aa1b855e1a3519172a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222120
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-06 18:57:17 +00:00
Chloe Stefantsova fc9f7e3372 [parser] Add support for typed super-initializer parameters
Part of https://github.com/dart-lang/sdk/issues/47525

Closes https://github.com/dart-lang/sdk/issues/47741

Bug: https://github.com/dart-lang/sdk/issues/47741
Change-Id: I0558b33aa43cc73e67ca0d17bd5c8ec1afdc526f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221634
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-12-06 10:31:57 +00:00
Chloe Stefantsova 312eb812c8 [parser][analyzer][cfe] Add parsing support for enhanced enums
Part of https://github.com/dart-lang/sdk/issues/47453.

Change-Id: I3a722cbcca6323b751eb3b2429bb9ffb642972b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217011
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2021-12-03 17:05:39 +00:00
Konstantin Shcheglov b1955d63ad Fix for SuperFormalParameter in NodeReplacer.
The test is still failing because there is an issue with parsing.

Change-Id: I2cab385ce5be68713b2b27d10fc52f662df7e211
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220885
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-22 17:02:50 +00:00