The rules for void are changed to allow uses of void where we
previously had a warning, such as the case of assignment to a
variable of type void or passing as a parameter of type void.
Change-Id: I1c1513b0000fa1c8eedbe2645fab503b28024fa3
Reviewed-on: https://dart-review.googlesource.com/70265
Reviewed-by: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Mark a few failures as expected, due to lack of line numbers in stack traces.
Move restoring of pool pointer out of inlined macro after exception.
Change-Id: I8ef1e0f86a1eabe42e007968481e0133d0e5e360
Reviewed-on: https://dart-review.googlesource.com/70741
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
We were attempting to "override" a failing test for the analyzer by
putting a "pass" annotation in a more specific section of the status
file. But that doesn't have the intended effect--it just means that
when the test is run for the analyzer, either a pass or a fail result
is accepted.
Change-Id: Iccd7e68c746e7989840c6d0e6ee16bd4f0677e2d
Reviewed-on: https://dart-review.googlesource.com/70163
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Paul Berry <paulberry@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>
Extends the illegal return type check for async functions to cover
illegal return types for functions marked async* or sync* as well.
Adds new error messages for illegal return types of functions marked
async, async*, and sync*. These error messages conform with those
produced by the analyzer.
Closes https://github.com/dart-lang/sdk/issues/33068
Bug: www.dartbug.com/33068
Change-Id: I6d8690537139d3d094a4e295fcac9de4f4a7f0af
Reviewed-on: https://dart-review.googlesource.com/69581
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
async function return type check whenever running in 'legacy mode'.
Adapts language_2_kernel.status such that a MissingCompileTimeError is
expected for illegal return types of async functions when running in
'legacy mode'. Updates the commentary in finishFunction in
body_builder.dart.
Some legacy tests* have revealed that it may not always be correct to
check whether [strongMode] is enabled before checking the return type of
async functions. The reason behind the strongMode check was to ensure
that [_typeInferrer.typeSchemaEnvironment] would be instantiated as
per ahe's suggestion.
There seems to be some inconsistency in the code base as to when
[_typeInferrer.typeSchemaEnvironment] is non-null. For example, during
the fasta perf benchmarks one may observe a null value, whilst it
seems that the member is always non-null when running `dart
--no-preview-dart-2 <script.dart>`.
* test log: https://ci.chromium.org/p/dart/builders/luci.dart.ci.sandbox/front-end-legacy-linux-release-x64/621
Change-Id: I2211bfe0ae75a7aa35e2d698ff5cba27af484d07
Bug: 33425
Reviewed-on: https://dart-review.googlesource.com/69920
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
declared return type of an async function is a super type of Future<T>
for any T. In case the check is not successful an error message is
produced. The location of the name of the offending function
declaration is used as location information for message. Ideally we
would use the location of the type, so until types get annotated with
location information the error message remains suboptimal.
This closes#33425 and closes#34057.
Thanks to dmitryas and jensj for their helpful guidance.
Bug: dartbug.com/33425 dartbug.com/34057
Change-Id: I3b3dadc25b574422ea1f38671fe8cba3ffdd494c
Reviewed-on: https://dart-review.googlesource.com/69307
Commit-Queue: Daniel Hillerström <hillerstrom@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Fix up override_inheritance_method_test.dart
Fix up override_inheritance_generic_test.dart
Fix up override_inheritance_field_test.dart
Fix up override_field_test.dart
Change-Id: I09f88c18e2473be645a955e1dc63d788e61382f4
Reviewed-on: https://dart-review.googlesource.com/64682
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Erik Ernst <eernst@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>
Remove accidental legacy test section from front_end bots.
Remove no-op --strong arg from test matrix.
Change-Id: Icafc7eeb3c25f5816596affeaf8f75a7328fb907
Reviewed-on: https://dart-review.googlesource.com/64520
Reviewed-by: Jonas Termansen <sortie@google.com>
Test language_2/symbol_conflict_test sometimes times out on
vm-kernel-reload-rollback bots in release mode, so marking it as
'Pass, Slow'.
Change-Id: I0018b68217310dbb1ca491ef988bc03add454547
Reviewed-on: https://dart-review.googlesource.com/64662
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
In Dart 2 classes are not allowed to have an instance method, getter,
or setter that conflicts with a static method, getter, or setter
declared in the class. Detect this at the start of top-level type
inference when we build an explicit interface for every class.
Change-Id: I39c1887a07fde0c40367d8f243a37f06dfbba353
Reviewed-on: https://dart-review.googlesource.com/60581
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>