Commit Graph

9081 Commits

Author SHA1 Message Date
Konstantin Shcheglov f15518dffc Report ILLEGAL_ENUM_VALUES_DECLARATION/INHERITANCE
Change-Id: I31a02b7c0fe50362ed6d9cb66159db3386f3b56e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-07 21:47:45 +00:00
Konstantin Shcheglov ef66f47631 Fix an enum rebase issue.
Change-Id: Idd09905a99193127954952ca91284a061ae60ab8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-02-07 20:00:11 +00:00
Konstantin Shcheglov 2c84f13edb Report ILLEGAL_NON_ABSTRACT_ENUM_INDEX
Change-Id: I028ce008c11a0e4b9e0bebef4e6b62c855a07e82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-07 19:42:20 +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 d7bb928f64 Report ENUM_WITH_ABSTRACT_MEMBER and NON_ABSTRACT_CLASS_INHERITS_ABSTRACT_MEMBER.
Change-Id: I3da69337edc299fee847ba7984b16ca7be65c1e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-07 19:26:18 +00:00
Konstantin Shcheglov 2ad4e8258c Report ENUM_CONSTANT_WITH_TYPE_ARGUMENTS_WITHOUT_ARGUMENTS
Change-Id: I41fa9cb8497671363878d2140dfec2ec3fc0f6ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231844
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-07 19:26:15 +00:00
Konstantin Shcheglov 2d14e064f5 Report more enum member conflicts.
Change-Id: I39a59fdd96e91c8172db0d747b05f8eef810a36c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231841
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-07 18:13:05 +00:00
Konstantin Shcheglov 3e8114261a Add HasCompletionData to a few more elements.
Change-Id: I7ea2f0b70cbc5a65584725d2ca662db37651ed1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-07 17:59:55 +00:00
Devon Carew 150df0637f [analyzer] remove the dep on package:cli_util
Change-Id: Ie5b0c29ae443588c501dd2012e645618aff17ca4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231846
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-02-06 05:26:40 +00:00
Konstantin Shcheglov c99e3af906 Report duplicate declarations for enums.
Change-Id: I2bda7ea3116a4ea8c65024c8ec4b5981e7d93c19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231746
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-05 02:07:30 +00:00
Konstantin Shcheglov 0962b173d6 Replace 'enumeration' with 'enum' in messages.yaml
Change-Id: I62d389bb9462a15f2b08d2fb313fc1a3fca74379
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231742
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-04 22:00:41 +00:00
Konstantin Shcheglov 14bead484c Report more enum hierarchy errors for enums.
Change-Id: I9ffc41ce9cbc9a51b059dc8a891e59420232d047
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231536
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-04 18:51:39 +00:00
Konstantin Shcheglov f69d1f887f Use CompletionSuggestionBuilder, and HasCompletionData to store location independent data.
Change-Id: I767bfc1c31b5aebc8f4e27267520f705701e7724
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231044
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-04 17:33:19 +00:00
Konstantin Shcheglov 1e66a8a079 Report more hierarchy diagnostics for enums.
Change-Id: If2c4ef3604fadfaa6d3d5af992f61a6a819a5b01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231528
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-03 23:39:26 +00:00
Brian Wilkerson 17422f82b2 Remove an unnecessary shared name from a message
Change-Id: I0569bd99620f2b276f9cc1510a4641bbe0cb7182
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231522
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-03 21:18:48 +00:00
Konstantin Shcheglov 8f2a27f940 Report ENUM_MIXIN_WITH_INSTANCE_VARIABLE
Change-Id: Idc15ea010fc0b7d7f4b551a2a4b8731bcfc74ad7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231325
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-03 00:03:49 +00:00
Konstantin Shcheglov 33b3c1d6c6 Report ILLEGAL_LANGUAGE_VERSION_OVERRIDE, when 'sourceLanguageConstraint' is set.
Change-Id: Ibbd786090a5a1a61da11f1e9de754202bdc454d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231322
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-02 20:20:39 +00:00
Konstantin Shcheglov f2740bd3b6 Create an implicit enum constructor even if there is a named factory constructor.
Change-Id: Iace1d803c5330b32c2856edfb3c1da14f461cff3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231283
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-02 19:27:30 +00:00
Paul Berry 9fa75965e3 In FunctionExpressionImpl, keep track of whether a function type was supplied via context.
This avoids the need to refer to context types after resolution is
complete.

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

Change-Id: Ia3f15080ad8b6f90525577694fefc172faa93286
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-02 18:59:09 +00:00
Konstantin Shcheglov 80230eedcd Support for 'sound_null_safety' in BazelWorkspacePackage.
Change-Id: I22e5b9ea64b52922394be892663acff0e7def016
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231188
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-02 18:29:10 +00:00
Konstantin Shcheglov 64001abe3e Add ConstructorElement.isGenerative and ClassElement.isDartCoreEnum
Change-Id: I0d7391fe02e450cb3ac33fd6abbe33a3561243ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-02 17:32:19 +00:00
Paul Berry bf51e35c46 Consolidate remaining calls to InferenceContext.setType.
Now that we only use InferenceContext.setType for expressions, this
change consolidates all the call sites to just two places:

- The method ResolverVisitor.analyzeExpression, which is used when
  recursively analyzing subexpressions inside expressions and
  statements.

- The method InferenceContext.setTypeFromNode, which is used during
  AST rewrites to transfer context information from the original node
  to the rewritten node.

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

Change-Id: Id236bcb1247c09b740bbbad41cb74ecda301cc86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231181
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-02 16:54:00 +00:00
Paul Berry 541b9a86e9 Clean up handling of for-statement and for-element bodies.
Change-Id: I10f3545a84a3b128e6c3587ff04d4d069383dd04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231183
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-02 16:34:49 +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
Paul Berry e1e3bcce17 Stop storing contextual information on VariableDeclaration nodes.
Instead of using InferenceContext.getContext and
InferenceContext.setType to associate type inference information with
VariableDeclaration nodes, we directly look up the variable type when
we need it.  This should be more efficient (since it avoids a map
lookup), and it should 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: I01262fb3c3e6789ee9da924e731d86d99ce3f4de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230946
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-02 14:59:49 +00:00
Konstantin Shcheglov 22a8295295 Report INVALID_REFERENCE_TO_GENERATIVE_ENUM_CONSTRUCTOR instead of INSTANTIATE_ENUM when enhanced-enums.
Change-Id: I634b3e50641b2b696b4d9e164266b43fdc72f137
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231063
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-01 23:58:45 +00:00
Paul Berry 0d5eec26f1 Stop storing contextual information on ArgumentList nodes.
Instead of using InferenceContext.getContext and
InferenceContext.setType to associate type inference information with
ArgumentList nodes, we pass the contextual information around on the
stack.  This should be more efficient (since it avoids a map lookup),
and it should 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: I331792cf6d7289a27fc71edfc6af33cd1af5288c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230942
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-01 23:54:05 +00:00
Paul Berry 6117501cd6 Streamline context handling for collection literals.
Rather than do two passes over each collection literal (one to push
contexts down and a second pass to resolve), we pass the contexts down
on the stack during a single resolve pass.

I decided to create an extra data structure to hold the context
information (so I only had one thing to pass around on the stack
rather than four).  The extra allocation will carry a small
performance cost.  However, I was able to reduce the number of passes
over the collection literal from two to one, replace a chain of
is-tests with a virtual dispatch, and eliminate a double-dispatch in
some cases, so hopefully the benefit of those improvements will more
than offset the cost.

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

Change-Id: I949c2c5ef99fc3395de3d67eaa8f326b7af5b158
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231062
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-01 23:42:45 +00:00
Konstantin Shcheglov af598f9d25 Report NON_ABSTRACT_CLASS_HAS_ENUM_SUPERINTERFACE.
Change-Id: Iec3daeba6b069c80e01baf4bc070059209d1ac4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231045
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-01 23:00:25 +00:00
Konstantin Shcheglov c995c02293 Resolve field formal parameters in enum constructors.
Change-Id: Ib0e22e75c5b8c9d1f578d856624fe509a3cbaaf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231050
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-01 19:09:45 +00:00
Konstantin Shcheglov dcc1b8bc18 Report NON_CONST_GENERATIVE_ENUM_CONSTRUCTOR.
Change-Id: I1a087a3b554d5d5439d43b0798d14a46310f1bfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231048
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-01 18:18:55 +00:00
Konstantin Shcheglov 17d2a0b755 Report SUPER_IN_ENUM_CONSTRUCTOR.
Change-Id: I403b51eed9a0f685e56433a2b567b8a38a95e15b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231049
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-01 18:18:35 +00:00
Paul Berry 410442716d If a try block terminates, don't consider the contents of the finally block to be dead code.
Fixes #48258.

Bug: https://github.com/dart-lang/sdk/issues/48258
Change-Id: Icf88c659f3258a723970d89882b58c75f8eff6d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231043
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-01 13:32:36 +00:00
Konstantin Shcheglov 7b2e9d147f Support for mixins in enums.
Change-Id: I75f23c358ddc5ea0a801447d16f7f037cb0cfd28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230945
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-31 19:07:24 +00:00
Konstantin Shcheglov 556b178032 Tests for getter/setter in enum.
Change-Id: I083a6fa507d62a9957e211fe937cfc6413aae321
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230944
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-31 18:02:34 +00:00
Konstantin Shcheglov c28e52c95e Add ExtensionElement.getField(name)
We already have `get fields`, and it seems that for consistency
we should also have `getField()`.

Change-Id: Id2684eaecf2e77377a63c53271301e5d9b652918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230920
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-29 17:46:44 +00:00
Konstantin Shcheglov 86383dd1af Build interfaces for enums.
Change-Id: I2e73761f46ac37d7bef6902575de031c9f401f6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230880
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-29 03:00:22 +00:00
Paul Berry 9057e2c532 Fix type inference of annotations that refer to constructors.
Previously we were skipping the donwards inference step.  This CL
refactors the downwards inference logic from
instance_creation_expression_resolver.dart so that it can be re-used
for annotations.

Fixes #48201.

Bug: https://github.com/dart-lang/sdk/issues/48201
Change-Id: Ia1b7939cdd350bab9bd019a14a1cf40fb61199ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230821
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-01-29 01:33:32 +00:00
Paul Berry f37dda4640 Fix instance member lookup fallback for static property lookup
When a static property lookup fails, the analyzer's error recovery
logic tries to fall back on looking up an instance member.  An
unfortunate consequence of this is that the looked-up member may have
a type that refers to unbound type parameters.  For example:

    class C<T> {
      List<T> t = [];
    }
    var x = C.t; // (1)

Although the line at (1) has an error, the analyzer continues to
analyze it assuming the reference to `t` is valid, producing a static
type for `x` of `List<T>`.  But this isn't a valid type because `T`
has no meaning outside the context of the definition of class C.

To avoid unbound type parameters leaking outside the class, we do an
"instantiate to bounds" operation at the time of the error recovery;
for this example that results in a type `List<dynamic>` instead of
`List<T>`.

Change-Id: I763bf32d16345b0a1a6f9f6893e78a138e85c8c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-01-29 00:03:22 +00:00
Konstantin Shcheglov 88b1f42637 Resolve field/super formal parameters for completion.
Change-Id: I855ed4838111212096b7f86dac96b1027acdd676
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230825
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-28 21:25:52 +00:00
Konstantin Shcheglov 0d55af75c9 Increment DATA_VERSION.
https://dart-review.googlesource.com/c/sdk/+/230440 changed the
summaries content, and without the DATA_VERSION change we get an
issue with Flutter samples analysis.

Change-Id: Ie9e8245d6d254d678cd75129c88511f02f7c7b39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230720
Auto-Submit: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-28 16:41:52 +00:00
Konstantin Shcheglov aa432071b6 Remove 'index' and 'name' parameters from enum constructors.
Change-Id: Id3fba669be70f830777fb3db1cfe31898e6df726
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230440
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-27 22:08:42 +00:00
Konstantin Shcheglov 51dfe64fb0 Don't report CONST_CONSTRUCTOR_WITH_NON_CONST_SUPER for enum constructors.
Bug: https://github.com/dart-lang/sdk/issues/48232
Change-Id: I8621f04c67bf8f3ef3ec82945516613058b12029
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-27 17:46:38 +00:00
Konstantin Shcheglov da48a6fb12 Create a new session on a file change.
This should restore throwing InconsistentAnalysisException.

Internal presubmit looks green.
https://fusion2.corp.google.com/presubmit/tap/424245133/OCL:424245133:BASE:424340361:1643210802936:6f26b405

Change-Id: I286d5db0fe51e8ea00d0fe83a70d4c9d59052715
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-27 00:44:39 +00:00
Brian Wilkerson 6c10e05ba3 Mark internal codes as never being displayed to users
Change-Id: I70b903059b37765c57bacf0f0402ec73e405fd4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-26 00:54:37 +00:00
Lasse R.H. Nielsen bd8c047a8b Disable 2.15 language features experiment flags.
Step of releasing 2.16.

Change-Id: I9336289e71bcbb2cc5d298c9fb621aa6d14e99b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227540
Auto-Submit: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-01-25 19:26:49 +00:00
Konstantin Shcheglov 1028355cad Use isEnumConstant in 'constants'.
Change-Id: Id02f46a438a4c5b7117cb37e9e82ef986e5941ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-25 17:00:11 +00:00
Konstantin Shcheglov e8d5008843 Update validation for final fields with const enum constructor.
For now just making it to not crash.

Change-Id: I415f0c7e17cc959f26f87acd2d662e7f6de3b39b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-25 05:37:26 +00:00
Konstantin Shcheglov 7162015869 Resolve enum constants to constructors.
Change-Id: Iace6dd63bd2071830436b070299991f4e811cdf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-25 02:48:38 +00:00
Konstantin Shcheglov 06e9046e34 Issue 48074. Display inherited default value for super-parameters.
Bug: https://github.com/dart-lang/sdk/issues/48074
Change-Id: I964141c9b2a1ccf4a2d08d6bfff7675aa6df9d5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-25 01:54:27 +00:00