`dart:mirrors` is not supported in AOT mode.
Bug: https://github.com/dart-lang/co19/issues/2546
Change-Id: I2b0d42df911c6f185e72239f4786a87c535de535
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353522
Reviewed-by: Siva Annamalai <asiva@google.com>
Auto-Submit: Sergey Grekhov <sgrekhov22@gmail.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Fixes: #54971
Change-Id: I033c8ba78e6cdcf26dce9cae8998308a595a37e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353262
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This makes it easier to run tests locally, just specifying the suites
`co19 corelib language lib web` to `test.py`.
It also make it easier to change which tests we run going forward.
Change-Id: I3a4765c18ee105055fdb9a6b59036da11b956e1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279973
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
A few co19 tests are marked as skipped for now, as they are hanging
due to https://github.com/dart-lang/sdk/issues/50026
Increase the number of shards to match the increased number of tests.
Change-Id: Ib91127986d13140164c357a22f2d1d9b7b2b7636
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260361
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-win-release-x64-try,vm-kernel-precomp-linux-release-simarm64-try
Change-Id: Iccd080591cc3dda60b5bd2ab9d8f2261445df610
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232880
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This CL re-enables (except on platforms that don't support them):
Language/Libraries_and_Scripts/Scripts/top_level_main_t01
Language/Expressions/Numbers/syntax_t34
Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I10a1b1c9abc125c000cc9e9ba7d749b8766e193d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212563
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Change-Id: Ia22499d5681213017b09eac818f4f57e1fba2885
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196485
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Change-Id: Iccf97f1a6a2753321c5d60db5e9c2291eeeb159b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194400
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Cq-Include-Trybots: dart/try:dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I426cdcb95cb726b52d4510d92d67be49b364accd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192931
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Change-Id: I69466760bb870fc94415311d92359d669c07f097
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192744
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
There are also skips for these tests in the legacy (*_2) suites.
I'm leaving those as skips because I think they will never be
expected to work since you have to opt into a newer language
version to get the feature.
Change-Id: I1631b1523c6a9be9a14c69c8cf772ea58309c706
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191482
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Remove references to the removed simarmv6 architecture.
TEST=ci
Change-Id: I10e9fc8291c3e5b6b9a4bd71ca05de95e53f22c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/187500
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
We create the parameter names array when loading the
FunctionDeclaration, but the required parameter flags are only set later
when we load the Code declaration. If there's an intermediate use of the
Function object that copies the required parameter flags, like creating
an ImplicitClosureFunction when loading a tearoff stored in the object
pool, there will be no set flags at that point.
Add a copy of the parameter flags to the FunctionDeclaration so the
required flags can be set at the same time as the parameter name and
type to avoid this scenario.
To avoid adding unneeded flags to the kernel bytecode, we only serialize
the parameter flags needed for each declaration, so FunctionDeclaration
and ClosureDeclaration only contain the required flag, and Code contains
all flags _but_ the required flag.
There are no trybots for strong mode + bytecode, but manually checked
by running the following on the main branch (cherry-picking the
test_matrix.json changes) and this branch:
python tools/test.py \
-n dartkb-mixed-strong-linux-release-x64,dartkb-interpret-strong-linux-release-x64 \
tests/language/nnbd/required_named_parameters/missing_required_argument_dynamic_test.dart
Cq-Include-Trybots: luci.dart.try:vm-dartkb-linux-release-simarm64-try,vm-dartkb-linux-release-x64-try
Change-Id: Ic75b831d5ceed08154e2c61b8f64461705558653
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162501
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
This deletes:
tests/co19
tests/corelib
tests/html
tests/isolate
tests/language
tests/lib
It does not delete tests/standalone because apparently there are tests
in there that are not in standalone_2. (I assume they were added after
the test migration. I don't know why they were added there.)
I have tried to remove references to the old tests from various scripts
and tools but may have missed some. (As you can imagine, grepping for
"lib" does not have the best signal-to-noise ratio.)
"It was a pleasure to burn. It was a special pleasure to see things
eaten, to see things blackened and changed. With the brass nozzle in his
fists, with this great python spitting its venomous kerosene upon the
world, the blood pounded in his head, and his hands were the hands of
some amazing conductor playing all the symphonies of blazing and burning
to bring down the tatters and charcoal ruins of history."
- Ray Bradbury, Fahrenheit 451
Change-Id: If3db4a50e7a5ee25aff8058b1483e2ce8e68424e
Reviewed-on: https://dart-review.googlesource.com/c/75420
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Terry Lucas <terry@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
The CL is reverted because it didn't account for the case when a check
of a user-specified type argument against the bound depends on another
type that is only known after type inference is done.
Change-Id: I1fd140af95ed37b9191a5b161a281d4639e3453f
Reviewed-on: https://dart-review.googlesource.com/c/79048
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
* The co19_2 test suite doesn't have collection/Maps at all. Though
test.py will ignore the unnecessary test status lines, there is no
reason to have them.
* The co19 test suite has these tests but they are not expected to
pass with a Dart 2 SDK. They are already skipped for all Fasta
targets, so the individual expectations can be removed.
Change-Id: I4d4c27254d4ff7da5a49da77fb2314b5beb035c1
Reviewed-on: https://dart-review.googlesource.com/c/78500
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
When a member in the interface of a non-abstract class is found to
have an implementation with the correct name which does not override
the representative declaration of the member in the interface (and thus
has not been checked against that member for override validity), call
the override check to check interface validity.
Override relations thus checked produce an extra context message
explaining that the override relation must hold because both members
are inherited by a non-abstract class.
Fixes https://github.com/dart-lang/sdk/issues/32014
Change-Id: I955f057e35fa30f33c19da37c9cea1262042431c
Reviewed-on: https://dart-review.googlesource.com/c/74642
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Fixes#12916.
Change-Id: Icef0f04f1575c8dad5f1cd23a9363f06fa2a2b35
Reviewed-on: https://dart-review.googlesource.com/74161
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Fixes regression #34528. Introduces a new test to mitigate future
regressions.
Closes#34528.
Change-Id: Iaf0a8f44db2a8b4a8151c391ddb8dff69910fe3a
Reviewed-on: https://dart-review.googlesource.com/75840
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Report error for negated hex literals > 2^63.
Optimized common case of web int literal exactness check.
Fixes https://github.com/dart-lang/sdk/issues/33311
Change-Id: Ib72b2dbb21e42489ee2d06b17302daf83d560df1
Reviewed-on: https://dart-review.googlesource.com/72802
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Implements static semantics for redirecting factories (c.f. §10.6.2 of
the specification). This CL does not include inference of actual type
arguments on redirectees, that is it does not handle the case where
type arguments have been omitted on the redirectee as in this
following example program:
class A<T> {
factory A() = B;
}
class B<T> implements A<T> {
B();
}
Closes https://github.com/dart-lang/sdk/issues/32988.
Also resolves the second part of
https://github.com/dart-lang/sdk/issues/30579.
Can possibly also close https://github.com/dart-lang/sdk/issues/11578.
Change-Id: I5f1fb60510ba6cdc917321239819c1f817b5b85d
Reviewed-on: https://dart-review.googlesource.com/74580
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Implement the feature spec for checking returns against inferred
function return types:
https://github.com/dart-lang/sdk/blob/master/docs/language/informal/invalid_returns.md
with the change that an invalid return without a subexpression is
a warning, not an error. This is because it is a warning in the
analyzer and it would be a breaking change to turn it into an
error.
The check for valid returns is moved to exactly where we handle
returns, rather than in ensureAssignable which is used as a
helper in a lot of places. A bug in type inference was fixed: we
would use `void` for the type of return without a subexpression
instead of `null`. To accommodate that we would use a
non-standard subtyping relation for returns. This could lead to
us inferring a return type of `void` in cases where we should
not.
Change-Id: Iee9ece9c722f47efa305f49490d3022d0bbb9f44
Reviewed-on: https://dart-review.googlesource.com/72403
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
E.g. `new Map<String>` is now reported as an error.
Note that this does not add a check for whether correct types are given,
so e.g.
```
class Foo<X extends num> {}
main() {
new Foo<String>();
}
```
is not caught by this fix.
Fixes#32972, #32281.
Change-Id: I57513b5c13865a828890775c8e14f7433d00bdbe
Reviewed-on: https://dart-review.googlesource.com/72382
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
types of its case expressions.
Resolves the first part of
https://github.com/dart-lang/sdk/issues/34207. According to the
language team the second part may soon become irrelevant.
Change-Id: Ifce38f2a62c293156dafa94f16799d5a126c6b9c
Reviewed-on: https://dart-review.googlesource.com/71981
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Fixes#32326.
Change-Id: Idef32a842a68c5c9ee58caff7b6e731204f033b6
Reviewed-on: https://dart-review.googlesource.com/72041
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
When invoking an expression whose static type is not a function type,
signal an error. However, allow invocations of expressions with
static type `dynamic` or `Function`. Fixes#32975.
Change-Id: Ia54d8df650076ad5c9c9c3a2c6f79ea31acbbbfe
Reviewed-on: https://dart-review.googlesource.com/72082
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
It is a compile-time error if an interface appears multiple times
across the extends and implements clauses.
This CL implements a check to detect the aforementioned case. A
previous commit implemented this by expanding and refactoring the
restricted super types check in source_loader.dart
(c.f. checkSemantics method). The restricted super types check decides
whether a type is allowed to appear in an 'extends', 'implements', or
'with' clause. However, it turned out it may have sat too early in the
compilation pipeline as it failed to detect the following case
class A implements Object {}
I decided that it was somewhat suboptimal to implement a special case
for "Object". Therefore I have moved the check to a later stage in the
pipeline, where classes without a super class have had the Object
class injected as their default super class. The check is now
implemented in kernel_class_builder.dart (c.f. checkSupertypes
method).
Closes https://github.com/dart-lang/sdk/issues/34193
Change-Id: Ie7153c896337b589118cac4b80e9df8ea5a09daa
Reviewed-on: https://dart-review.googlesource.com/70864
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Drops code to handle special evaluation order rules for super
initializer before the end.
Initializer check code now also recovers from initializer errors.
Fixes https://github.com/dart-lang/sdk/issues/33101
Change-Id: I1024853bfd3acfef42630bdc2fc47782746b07c0
Reviewed-on: https://dart-review.googlesource.com/68060
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>