Commit graph

90694 commits

Author SHA1 Message Date
Paul Berry c175d48343 Front end: fix type inference for object patterns that refer to typedefs.
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>
2023-03-24 12:20:08 +00:00
Chloe Stefantsova 628ba2ac64 [cfe] Use StateError as the pattern matching error in assignments
Part of https://github.com/dart-lang/sdk/issues/49749

Change-Id: I9c4fb121526ca40e5809be8f4a8a5770d551cfb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291063
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-03-24 11:30:57 +00:00
Alexander Thomas f5aaf580e6 [infra] Update checked-in SDKs to 3.0.0-356.0.dev
Fixes: https://github.com/dart-lang/sdk/issues/51824
Change-Id: Icae09625b14ed3e574aa5f29caf9756e70390a2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290905
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2023-03-24 10:27:28 +00:00
Johnni Winther 23ff65a79b [cfe] Avoid static type context leak
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>
2023-03-24 09:27:43 +00:00
Johnni Winther b126fad7c4 [cfe] Handle negative length in list/map pattern
Change-Id: Ifb3fbace24ca8d20fce48327c85bb1c4a92054f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290523
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-03-24 09:24:25 +00:00
Kevin Chisholm 67cbbd538b [Process] Breaking change form fails to render
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>
2023-03-24 08:09:15 +00:00
Johnni Winther 290706f497 [cfe] Don't cache constant in a lazy region
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>
2023-03-24 08:07:57 +00:00
Konstantin Shcheglov 6ef15e48bb Prepare to publish analyzer 5.10.0 and _fe_analyzer_shared 58.0.0
Change-Id: Ia298440a6d4a07fa777fe182c64cf0bb830d31ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290910
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-24 02:39:22 +00:00
Devon Carew e6ee09e23b [pkg/js_*] use package:lints/recommended.yaml for analysis for pkg/js_shared and pkg/js_runtime
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>
2023-03-24 01:10:09 +00:00
Nate Biggs 0ac7c843ee [dart2js] Update experimental inferrer with changes from comments in unfork.
Change-Id: I467f94d17a6d2fa002eb7f506360d6b4a62806a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290441
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-03-24 01:01:44 +00:00
Derek Xu a6a040658c [VM/Service] Remove sealed and final mixin tests from get_object_rpc_test
sealed and final are being changed so that they cannot be applied to
mixins. See https://dart-review.googlesource.com/c/sdk/+/290614.

Change-Id: I738961f153f86e417db4520a02ab401af7563aae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291001
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-24 00:45:46 +00:00
Joshua Litt 2ca521c64c [js] Add sources js_types and js_annotations for analysis reasons.
Change-Id: If05f8a1b924a00616d5f616ff4a534e9237a6c82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290916
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-03-24 00:39:57 +00:00
Johnni Winther 210275c1fe [cfe] Use AsExpression for AssignedVariablePattern lowering
The lowering previously used a PromotedCachableExpression, therefore
missing the needed check on assignment.

Closes #51432

Change-Id: I9e671326df25add9a8abea03d1e52b1be5740adc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289901
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-03-24 00:10:07 +00:00
Konstantin Shcheglov 04c1d58a4a Use mixins for analyzer packages, to prepate for language 3.0
Change-Id: I28fb5cf51c5dae887f19613d874d1ff264954be0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290912
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-23 23:57:53 +00:00
Ryan Macnak fc65f506a8 [vm, compiler] Always reserve x18 on RISC-V.
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>
2023-03-23 23:17:50 +00:00
Nicholas Shahan 230ef696eb [ddc] Remove special case for = mixin application
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>
2023-03-23 23:15:36 +00:00
Nate Biggs 3bc19d459b [dart2js] Fix unevaluated const evaluations for record literals.
Change-Id: I72430e012b5053e37894ac64e9e1d642c478abdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290981
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
2023-03-23 22:56:15 +00:00
Nate Biggs 32c5b81f9c [dart2js] Add unit tests for records.
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>
2023-03-23 22:56:15 +00:00
Sam Rawlins d8613bba50 [analyzer] Move 3 more HintCodes to be WarningCodes, UNNECESSARY_*
Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: I71291bfa959d7553c64d4a9e1f2918892ae012eb
TEST=trybots
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290403
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2023-03-23 22:52:36 +00:00
Robert Nystrom c89ec96b96 Fix int-to-double test to work on the web.
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>
2023-03-23 22:47:49 +00:00
Natsu 7c6f6d6232 Update dartfuzz code to remove generation of old super-mixins
Closes https://github.com/dart-lang/sdk/pull/51682

GitOrigin-RevId: 1bd06789a88d381d817c45b8cc74de34f8753a8b
Change-Id: I32c409e1b277fad98db6b4450adc22fa60973c04
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287780
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-03-23 22:44:33 +00:00
Danny Tuppeny f927a2544e [dds/dap] Update test expectations for test_api/matcher change
The `expect` function was moved from test_api to matcher in cc0598b2c3.

Fixes https://github.com/dart-lang/sdk/issues/51838.

Change-Id: I6fdc51ffd92880aba0cfc0a68105beac02a74d91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290962
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2023-03-23 22:39:46 +00:00
Kallen Tu 66c1b0db50 [analyzer] Report an error when implementing a base class through a sealed class.
Bug: https://github.com/dart-lang/sdk/issues/51810
Change-Id: I478eff8484fa5d3bddfb9cf1c744e6d65a72f6c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-03-23 22:06:01 +00:00
Sam Rawlins bf97d18c87 [analyzer] Test UNNECESSARY_QUESTION_MARK in patterns
Bug: https://github.com/dart-lang/sdk/issues/51750
Change-Id: I8d27aeb7b8c4ca4ea900e7c9017333f239f59210
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290906
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2023-03-23 20:26:18 +00:00
Konstantin Shcheglov 5cca9584b2 Fix for ConstantPattern.beginToken, use 'const'.
Change-Id: I77a0b1f1aa67c9901cdf8ce4b140a358ce5e70dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290908
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-23 20:17:20 +00:00
Anna Gringauze 7b81625180 [Expression compiler] fix pattern evaluation and scope tests
- 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>
2023-03-23 18:19:07 +00:00
Konstantin Shcheglov e8f6276a46 Update navigation region from PatternField.name to the referenced element.
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>
2023-03-23 18:02:09 +00:00
Johnni Winther a6d23ad697 [cfe] Skip lookups for wildcards in list patterns
Closes #51771

Change-Id: I1b79beb1df3c5d9c35e109505a04f51926db679d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289603
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-03-23 17:53:30 +00:00
Ben Konyi 15de818977 [ Service ] Add new InstanceKind "UserTag"
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>
2023-03-23 17:51:03 +00:00
Ryan Macnak 9e9b3770f4 [infra] Add configuration to migrate VM checked to NNBD.
Move from Linux to Mac because the Mac pool has more capacity.

Change-Id: Ie8beb33ea2f3e84f78a2824db5540249d6977e35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290608
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2023-03-23 17:45:27 +00:00
Kallen Tu 0fd1b672c5 [cfe/ffi] Don't ignore modifiers in dart:ffi when used in pre-feature code.
In pre-feature libraries, don't ignore the class modifier errors except for the base/final subtyping error. Otherwise, we can't even extend `base` types in older pre-feature versions.

Bug: #51683

Change-Id: I32ead106fc8d99a0dd72781368c41afefcfd8f53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289120
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-03-23 17:20:39 +00:00
Kallen Tu 69ce2b3104 [analyzer/ffi] Don't ignore modifiers in dart:ffi when used in pre-feature code.
In pre-feature libraries, don't ignore the class modifier errors except for the base/final subtyping error. Otherwise, we can't even extend `base` types in older pre-feature versions.

Bug:#51683

Change-Id: I884a9b8018899617444b9099bc64aef66bdb1eec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289081
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-03-23 17:11:33 +00:00
Chloe Stefantsova 6f6581ff75 [cfe] Implement TypeBuilderComputer.visitRecordType
Closes https://github.com/dart-lang/sdk/issues/51815

Part of https://github.com/dart-lang/sdk/issues/49713

Change-Id: Ib01721765d6112e12d23cd5f8e2990b4c687d732
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290841
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2023-03-23 17:10:44 +00:00
Kevin Chisholm 072c817b5f [Process] Add template for breaking change requests
Breaking change requests are currently received in an unstructured way.  To create a more reliable and predictable process, we will use github forms.

This CL creates the form, follow-on CL will update the breaking change documentation.

Issue: https://github.com/dart-lang/sdk/issues/51801

Change-Id: I5ecaa042e3fafdd9d735dd43bccf954aa73e2a2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290605
Commit-Queue: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-03-23 16:48:46 +00:00
Johnni Winther 03700211b2 [_fe_analyzer_shared] Create pattern syntax for witnesses
This updates the toString on Witness to produce pattern code. The
created pattern is directly derived from the predicates of the
witness and there contain some needless precision, for instance
`[...[...]]` instead of `[...]`. It is the plan to address this in
a follow-up.

Change-Id: Ied7930f36b1e1818540b8c635b18ff92f28e113b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290720
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-03-23 16:25:41 +00:00
Joshua Litt 0d6a1acd75 [js] Flip strict mode flag for Dart2Wasm.
Change-Id: I1847e60d2db86dabeda78839895e1acacbe3ffc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290348
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2023-03-23 16:18:20 +00:00
Johnni Winther 31d32b2e24 [cfe] Ensure enablePrimitiveEquality is for the current library
This fixes a problem where current library of the constant evaluator hasn't be updated to match that of the transformer.

Change-Id: I3386747c20f8283f4a6789dbe33bc48a934d520f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290860
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-03-23 16:17:37 +00:00
Chloe Stefantsova cfe9932a9e [cfe] Make pattern matching error a StateError
This is the first step in adjusting the runtime error raised on a
pattern mismatch in an irrefutable context. For now, the error message
isn't specialized and doesn't reflect the nature of the mismatch.

Part of https://github.com/dart-lang/sdk/issues/51720

Part of https://github.com/dart-lang/sdk/issues/49749

Change-Id: Ie4b997a1a36e92b25f1372f4dd98941dbcc08b61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290842
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2023-03-23 16:10:16 +00:00
Srujan Gaddam 82a60e80d2 [dart2wasm] Refactor method specialization to use inheritance
We've been using enums to denote procedure types and lowerings, but
with object literals and invocation-level lowering, the code to
handle the enums become increasingly complex. This CL separates out
the logic to individual classes instead.

Change-Id: I896dcfe1a00d649bf19d8e5315ed1deca3c3dad3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290606
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-03-23 16:09:34 +00:00
Konstantin Shcheglov 56a43c0867 Add 'DartType.isDartCoreType'
Change-Id: Ifd72be0e0e70e0d48f0f0ff8d2afa2102ef2d6ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290707
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-23 16:02:13 +00:00
Konstantin Shcheglov f2bd00a32a Rewrite expressions in ConstantPattern(s) into TypeLiteral when appropriate.
Bug: https://github.com/dart-lang/linter/issues/4195
Change-Id: I5cf06da31aed9347002684580c106747a057e1f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2023-03-23 16:01:31 +00:00
Danny Tuppeny 443d6d3200 [analysis_server] Don't produce inlay hints for parameters without names
Fixes https://github.com/Dart-Code/Dart-Code/issues/4436.

Change-Id: I15e144134e0e16f93ad38f2c393b32a7d18749ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290762
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2023-03-23 15:32:54 +00:00
Devon Carew 85cf783fe8 [pkg/test_runner] analyze with package:lints/recommended.yaml
Change-Id: Iab61ff9f67b40157657fde2d732e970d67c9fcac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290607
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-03-23 15:23:17 +00:00
pq db80d18ad4 support converting to switch expressions when cases have no breaks
Fixes: https://github.com/dart-lang/sdk/issues/51826

(Note: a pass to refactor some shared logic to follow.)

Change-Id: If82854f0d5fa5f6596308a04248bd6f4e7231a0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290661
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2023-03-23 14:58:34 +00:00
Sergey G. Grekhov 9640bef8ed [co19] Roll co19 to c1aef806ebbc20bedee6043bf517785f33fd1094
2023-03-23 sgrekhov22@gmail.com Roll failures fixed (dart-lang/co19#1962)
2023-03-23 sgrekhov22@gmail.com Fixes dart-lang/co19#1937. Add `@dart=2.19` to class implementing `LinkedHashSet` (dart-lang/co19#1961)
2023-03-23 sgrekhov22@gmail.com dart-lang/co19#1874. Update LanguageFeatures/nnbd/weak/overriding tests to work with class modifiers (dart-lang/co19#1960)
2023-03-22 paulberry@google.com Minor fixes to execution_pattern_for_in_{element,statement}_A01_t01 (dart-lang/co19#1958)
2023-03-22 sgrekhov22@gmail.com dart-lang/co19#1401. Tests for invocation keys (dart-lang/co19#1950)
2023-03-22 sgrekhov22@gmail.com Fixes dart-lang/co19#1951. Don't use fixed port number (dart-lang/co19#1952)
2023-03-22 sgrekhov22@gmail.com Fixes dart-lang/co19#1955. Use non-matching rest elements in matching_list_A02_t01.dart (dart-lang/co19#1957)
2023-03-22 sgrekhov22@gmail.com Fixes dart-lang/co19#1940. Add `final` modifier to classes extending `Struct` and `Union` (dart-lang/co19#1956)
2023-03-21 sgrekhov22@gmail.com Fixes dart-lang/co19#1928. Replace `extends Iterator` by `implements Iterator` (dart-lang/co19#1953)
2023-03-21 sgrekhov22@gmail.com Fixes dart-lang/co19#1944. Replace `extends StreamSubscription` by `implements StreamSubscription` (dart-lang/co19#1954)
2023-03-20 sgrekhov22@gmail.com Fixes dart-lang/co19#1946. Duplicated test removed (dart-lang/co19#1948)
2023-03-20 sgrekhov22@gmail.com Fixes dart-lang/co19#1947. Move nnbd-strong runtime checks in a separate test (dart-lang/co19#1949)
2023-03-20 sgrekhov22@gmail.com dart-lang/co19#1401. Matching tests for map pattern (dart-lang/co19#1929)
2023-03-17 sgrekhov22@gmail.com dart-lang/co19#1401. Call insertions tests added (dart-lang/co19#1945)

Change-Id: I27c375f32b02e8bea78562adb58ef5da1b629a45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290764
Reviewed-by: Alexander Thomas <athom@google.com>
2023-03-23 14:22:47 +00:00
Paul Berry c358118e9f When type inference fails for object patterns, fall back on instantiate-to-bounds
(As discussed in https://github.com/dart-lang/language/issues/2770#issuecomment-1479624850)

Fortunately this was easy to do because we already have the necessary
logic to fall back on instantiate-to-bounds when type inference fails;
it's a standard part of the "upwards inference" algorithm.

Bug: https://github.com/dart-lang/language/issues/2770, https://github.com/dart-lang/sdk/issues/51795
Change-Id: I91847fc01d1420e6bfb584e8536ebca803133bd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290613
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-03-23 13:13:20 +00:00
Emmanuel Pellereau d0556f9c27 Revert "Reland "Add class modifiers to dart:convert.""
This reverts commit 608934e330.

Reason for revert: breaks google3. See b/274843808.

Original change's description:
> Reland "Add class modifiers to `dart:convert`."
>
> This is a reland of commit b2f4cf3e01
>
> Commented out deprecation for now.
>
> Original change's description:
> > Add class modifiers to `dart:convert`.
> >
> > The usual approach:
> > Pure interfaces marked `interface`.
> > Pure implementation classes marked `final`.
> > Base classes marked `base` or nothing, and `mixin class` if reasonable.
> > Combined X/XBase/XMixin where possible.
> >
> > CoreLibraryReviewExempt: Aske is away
> > Change-Id: I927f9bd488fb385ff9c17c8fc94920a1f5076347
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289200
> > Reviewed-by: Stephen Adams <sra@google.com>
> > Reviewed-by: Slava Egorov <vegorov@google.com>
> > Reviewed-by: Nate Bosch <nbosch@google.com>
> > Commit-Queue: Lasse Nielsen <lrn@google.com>
>
> CoreLibraryReviewExempt: Approved in original.
> Change-Id: I1bc14f99b742567e2634dcfcbc52f332dbcc5364
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290521
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>

Change-Id: Ie438531e9b97658c86e242fabddbb8a2919f634b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290763
Reviewed-by: Alexander Thomas <athom@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Oleh Prypin <oprypin@google.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
2023-03-23 12:19:33 +00:00
Johnni Winther f7058a2301 [cfe] Add test for 51716
Closes #51716

Change-Id: I4d5e17af7be3cacd3ca9b4c2301de798a1ea00bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290530
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-03-23 08:25:09 +00:00
Joshua Litt 2459634762 [js] Bump package:js min version.
This is due to bd79be0e19, which will break users on older versions of the SDK.

Bug: #51774
Change-Id: I44f3bd5d0e4bc889d393440b03b4bab33d2ca70a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289620
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-03-23 04:03:10 +00:00
Sam Rawlins f8c6f2135d [analyzer] Remove many instances of the word 'hint'
I took care to leave code and comments which _does still_ refer to the
remaining Hints. This CL is not super complete, but I think addresses
most of the outdated text refering to Hints. I will do another round
after migrating more to Warnings.

Bug: https://github.com/dart-lang/sdk/issues/50796
Change-Id: Iab58dbbfbdef86e21dd65b2a96d8e34e3e7e54ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290440
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2023-03-23 03:59:55 +00:00