Change-Id: I4ecec92d5d0d51e050e2d3a189eede439e5b8de3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171520
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
These tests involve large list literals which are very slow to
compile in AOT/debug mode, or they perform a large amount of work
which is too slow on simulated architectures (simarm, simarm64).
Closes https://github.com/dart-lang/sdk/issues/43614
Change-Id: Iafe1407247cc69e641d1e63f47b4c3d9f6eea35f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168782
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Cq-Include-Trybots allows the CQ to submit the rolls safely and allows
for editorial control of which tryjobs to run for a given roll before
starting them.
Also formats the jq program according to go/bash-style/#s5.3-pipelines.
Change-Id: Ib072c971b06bd1e4bbff05887c8a84434c5949ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166637
Reviewed-by: Jonas Termansen <sortie@google.com>
Change-Id: Ie7894c39ec5fdee519c617862c32e3aaa263488b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161161
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@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>
* Skip tests that use type aliases on analyzer configurations.
* Shard co19 test more on VM AOT builder (to avoid shard timeouts).
Change-Id: I5834091e91f229242329ee9e7456ca822d18c0b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151223
Reviewed-by: Alexander Thomas <athom@google.com>
co19 test migration has started, and these tests will be unskipped
folder by folder now.
Change-Id: I7dad1a97d1a676042512a8a19e1403849e039f97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149002
Reviewed-by: William Hesse <whesse@google.com>
This reverts commit 9a588de9f4.
Reason for revert: The tests need additional fixes before they can be enabled, and this CL makes it harder to land the support for running
the tests on tryjobs.
Original change's description:
> [co19] Enable tests migrated to null-safety
>
> Change-Id: I738f5be6fe60aa4addb925101eb7f2912627ec8b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148527
> Reviewed-by: Sergey Grekhov <sgrekhov@unipro.ru>
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: William Hesse <whesse@google.com>
TBR=whesse@google.com,athom@google.com,sgrekhov@unipro.ru
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: If758a0041214693aa6cd90f76b3e1a4f4db78c5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149283
Reviewed-by: Alexander Thomas <athom@google.com>
The co19 tests were fixed in the co19 and co19_2 suites.
Change-Id: Ib71bfdcb90b0f4b77c77f3fc6ee74f47605b71af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145580
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Previously, the script would look for an argument that is matches "co19"
exactly. NNBD builders currently use "co19/LanguageFeatures/nnbd" as a
test selector. This change will make the update script recognize both
the raw suite, as well as "suite with selectors".
Change-Id: I22d3274b7e99e4bfd96859bdb2ad47f4ff5acc37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128721
Reviewed-by: William Hesse <whesse@google.com>
Change-Id: If0477e6096af1cec41b346c0c288ed73051f61df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126644
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
This will allow creation of the co19 NNBD CIPD package. We'll keep the
old variant of the script to create the co19 legacy packages until the
non-NNBD tests are no longer needed.
The new layout on CIPD will be:
dart/third_party/co19 (co19's master branch)
dart/third_party/co19/legacy (co19's pre-nnbd branch)
Change-Id: I21c61083630de43be10fcead221616a2bc6f9c20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125962
Reviewed-by: Jonas Termansen <sortie@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>
- option --no-preview-dart-2 will now result in an error
- change aot-assembly build rule to generate AOT snapshot using Dart 2
- generate coresnapshot using Dart 2 (this snapshot is not used yet, next CL which switch the isolate create code to use this snapshot)
- by pass all Dart1 test runs in the status file
- change the default compiler setting in test.py to use dartk
- have test.py not pick up any configuration for --no-preview-dart-2
Change-Id: Ia136943ebfd0fed0c52683b330745b3e2c7a7ce6
Reviewed-on: https://dart-review.googlesource.com/75820
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Siva Annamalai <asiva@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>
Removed all sections labeled $compiler == dart2js and !$fasta.
Removed $fasta from all sections with $compiler == dart2js and merged
with existing sections as appropriate.
Some additional cleanup and normalization.
Change-Id: I8b93283a2cce22ce60e29d364c8d0e70dccbb6e3
Reviewed-on: https://dart-review.googlesource.com/71840
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Johnni Winther <johnniwinther@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>
Specification disallow name conflicts between
- type variables and class names
- type variables and getter names
- type variables and member names
Although not present in current specification, the language team confirms that
it is also supposed to be a compile-time error if there is conflict with a setter.
Closes https://github.com/dart-lang/sdk/issues/33827
Bug:
Change-Id: Ia25bc91c3287f93ae43faae121a1f9d81b179c6b
Reviewed-on: https://dart-review.googlesource.com/70500
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Bug: https://github.com/dart-lang/sdk/issues/33022
This commit adds an error when a final field is not initialized at all
(and there is at least one generative constructor). A later commit
will add an error for the case where a field is initialized by some,
but not all, generative constructors.
A number of classes in the Dart2js and DDC support libraries use
uninitialized final fields to indicate getters in the corresponding
native classes. This commit adds a temporary whitelist for the
affected files, which can be removed when the fields have been
replaced by external getters.
This is tracked by https://github.com/dart-lang/sdk/issues/33762
Change-Id: I6b5cee230c7cd5554da2b61da7ebddb6b0b9396e
Reviewed-on: https://dart-review.googlesource.com/63781
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Update Dart 1 status for 03df8b1eb8.
This should make the front-end legacy bot go green.
Change-Id: I8679da869ac1e03aa263fc8181869bf47880cc5a
Reviewed-on: https://dart-review.googlesource.com/67540
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Change-Id: Iffd934a67668901176a84c9b01512711a011652d
Reviewed-on: https://dart-review.googlesource.com/67803
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
The co19-1 suite is broken due to changes to ALL_CAPS constants.
Once ie11 bots are migrated to the test-matrix, they will be updated to run
co19-2 and this change will not be necessary.
TBR=whesse@google.com,johnniwinther@google.com
Change-Id: I16d1e0dd40cabf89c60fe2ddce596b74ba12e615
Reviewed-on: https://dart-review.googlesource.com/66660
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This reverts commit 11001793a2.
Reason for revert: Doesn't allow void to void assignment. This is breaks a lot of packages.
Original change's description:
> Check void usage and invalid returns
>
> Closes https://github.com/dart-lang/sdk/issues/30470
>
> Change-Id: I2ed5b54c74e0bba2771036774bbe2197ce29109d
> Reviewed-on: https://dart-review.googlesource.com/65141
> Commit-Queue: Peter von der Ahé <ahe@google.com>
> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
TBR=ahe@google.com,dmitryas@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I78f479cf8b0824dd338ae43a5514f320fd112a3f
Reviewed-on: https://dart-review.googlesource.com/66040
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Change-Id: Idd473d5105237bcb57c2c051e3a1903c041ec323
Reviewed-on: https://dart-review.googlesource.com/65323
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
This CL adds support to build.py and test.py for building/testing
a VM with the interpreter on x64, e.g.:
$ ./tools/gn.py -m release -a x64 --bytecode
$ ./tools/build.py -m release -a x64 --bytecode runtime
$ ./tools/test.py -m release -a x64 -r vm -c dartkb language_2
Change-Id: I956d23790636609d4a2e71129481fcbd7afef9a0
Reviewed-on: https://dart-review.googlesource.com/65206
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Checks override on fields and for methods with type parameters.
Bug: 32613
Change-Id: Ia32d1080959bc706fd72a075fb6ba724fa93fd58
Reviewed-on: https://dart-review.googlesource.com/64542
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>