base mixins and base mixin classes.
Change-Id: Idfe7576f38382c5e9a0ff968aae00f48990e1d38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290351
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
We have a spike of crashes internally.
Change-Id: If7c280692ac0acdd2e4a4acd6096a4669746069c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291120
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The presence of errors (and previously, warnings) affects what
completions are offered (or their order?) and what fixes are offered
(or their order?), and the order of re-analysis.
When unused local variables and imports etc are WARNINGS, fixes,
completions, and re-analysis should not regress.
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: If5141eec7df01f50caee5bf245c031b5a51ea590
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291100
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
If a declared variable occurs inside a pattern assignment (e.g. `[a,
var b] = c`), we now recover using the `DeclaredVariablePattern` AST
node. Normally, a `DeclaredVariablePattern` wouldn't appear inside a
pattern assignment, but it's better to recover in this way because it
avoids dropping the keyword token (`var` or `final`) or type.
Fixes#50927.
Fixes#51529.
Bug: https://github.com/dart-lang/sdk/issues/50927, https://github.com/dart-lang/sdk/issues/51529
Change-Id: Ia65853baeae0e8eb999b7bd82fb2455e10b2b996
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291044
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
There is a desire to unify the two subclasses of the analysis server,
but I didn't attempt to do that in this CL.
Change-Id: I17bbf4f6247fc547df1c82f02e74c50eabe7aadc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291000
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
Disallow using final classes on on-clauses outside of its library.
Update tests to show this behaviour. (Or at least in a state where I can test out the implementation)
Change-Id: I74306c873dbd047c6b94d8e8e75c215562dd9483
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290915
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Also adds a dropped link target so that we don't break existing users.
Change-Id: I98e5e9fe2e51730150acfab889245a7b9f6b11d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290180
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
We also stop reporting
`HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE` and
`HintCode.DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE_WITH_MESSAGE`
as these are now replaced by the new lint rule.
The biggest change here is in the DEPRECATED_MEMBER_USE tests,
as most of these tests have
`DEPRECATED_MEMBER_USE_FROM_SAME_PACKAGE` reported (since it's
easier to write tests with files in one package). We move all
of those tests to `DEPRECATED_MEMBER_USE` tests, without losing
coverage.
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: I7cada44265cd0e1e47ab77d4354de9a5571db614
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289444
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Requires INCLUDE_SAMPLING_HEAP_PROFILER to be defined.
TEST=DartAPI_HeapSampling_*
Change-Id: I1c95be4747b295823a8fae1f369f9dc5d95a274e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290620
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
The spec uses the terms "upwards" vs "downwards" inference to refer to
whether type constraints come from a return type or parameter types.
Previous to this change the code used the terms "upwards" vs "partial"
inference to refer to whether the types being chosen were preliminary
(and hence might contain `?`s) or were the final inferred types. This
led to confusion; for example the method
`downwardInferObjectPatternRequiredType` was calling `upwardsInfer`.
This change adjusts the nomenclature so that the methods that choose
types are called `choosePreliminaryTypes` and `chooseFinalTypes`, to
avoid any confusion with the direction of inference.
See discussion here:
https://dart-review.googlesource.com/c/sdk/+/290613/comment/894a767c_e269584e/.
Change-Id: Ie05dcae027ca82b2ce7e5a57f1846412d5b32d50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290901
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
I've also added some runtime checks to
`tests/language/patterns/object_pattern_inference_test.dart` to verify
that the object patterns match when they should match and don't match
when they shouldn't; this helps verify that not only has the front end
inferred the correct type for the object patterns, but it has also
stored the correct type in the kernel representation.
Fixes#51795.
Bug: https://github.com/dart-lang/sdk/issues/51795
Change-Id: I73ce43e440db50d9942deb4a1eb4ee68a5c23142
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290900
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This ensure that the StaticTypeContext used for 'evaluate' is only
used within the method call and doesn't leak to subsequent evaluations.
Included is a repro for the fix in
https://dart-review.googlesource.com/c/sdk/+/290860 which was triggered
by the same underlying problem of the leaky static type context
Change-Id: Ib603c377b420bd75e6a0737e8933343e61fab65c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290961
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Fixes an indentation error in the breaking change issue for which prevented the issue template from rendering.
Change-Id: I317061671f877e562060b3b75b6fa543efc480c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291041
Reviewed-by: Alexander Thomas <athom@google.com>
When unevaluated constants are found in conditions, a lazy region
is created for evaluating the subexpression, ensure that constant
locals are replaced within the subexpressions while still leaving the
subexpressions themselves unevaluated.
In these lazy regions, the result of evaluating the subexpressions
should not be cached, since these subexpressions are not themselves
unevaluated and should be evaluated if encountered elsewhere.
This was previously not done, leading to constants not being
evaluated even when these didn't contain any unevaluated constants.
Closes#51823
Change-Id: Ibfc02fef3ecfcd2f1d2e9e1451f0eb71dde6fb42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290963
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Update the pkg/pkg.dart script to also include information about the size of the pkg/ packages (so we know ~how much code is on older analysis options sets).
Change-Id: Ief1b9a868752a01aef5dd95a4ce1c74795315bc4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290615
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
The extracted runtime offsets can handle architecture differences but not OS differences. Compare handling of x18 on ARM64.
TEST=gen_snapshot_fuchsia
Change-Id: Ide7557fa9f0cb5ed3d65f05a68310b88883957fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290704
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Remove the special case for `class C = Object with M;`
and fall into the same code path that would be used for
`class C2 = BaseClass with M;`
This introduces one new class to the hierarchy but that
class contains the members synthesized on the class. This
ensures they do not get lost during the mixin application at
runtime.
It appears likely that this has been broken for some time and
generating incorrect code when methods require covariant checks.
Fixes: https://github.com/dart-lang/sdk/issues/51768
Change-Id: If499b7abd1f8877b9f420ce74b790555c8d258f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290402
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
The expectations set here are updated as fixes/improvements are made in the next 2 CLs.
Change-Id: I0ac251ce09b980cde9e01afc1fa81b987a619747
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290980
Reviewed-by: Stephen Adams <sra@google.com>
Change-Id: I5e208edc53543de8d11aa6e81072ad7f61a23d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290913
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
- Update pattern scope tests after CFE switch improvements.
- Fix incorrect end offset detection in expression compiler.
Account for synthetic variables that can have offsets from
later code (i.e. created for hoisting).
Related: https://github.com/dart-lang/sdk/issues/51554
Closes: https://github.com/dart-lang/sdk/issues/51825
Change-Id: I07cd319f8996acae2dada96ba6e43eac9e04fbb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290706
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Unfortunately, IntelliJ cannot easily support `foo:`, only `foo`.
So, I update it to navigate from `foo`, explicit or variable.
Bug: https://github.com/dart-lang/sdk/issues/51797
Change-Id: If4cbf553beedf2998cd6ad3fbd7528865b523420
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290904
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Also adds a new "label" property to @Instance
TEST=pkg/vm_service/test/get_object_rpc_test.dart
Change-Id: I746d56909a55e0158896e1034665147c469109bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290920
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>