Commit Graph

11 Commits

Author SHA1 Message Date
Johnni Winther 56f46b0659 Remove non-nullable experiment flag from front_end test cases.
This changes the CFE expectation test suites to use unsound null safety
as default to avoid passing --enable-experiments=no-non-nullable to opt
out old test folders.

This change removes most test folders from the 'strong' tester, since
this now only supports sound null safety, which requires all libraries
to be opted in. Instead, the 'weak' tester now runs all test folders.
Additionally the 'outline' tester is changed to use unsound null safety
so that it call be used on all test folders.

The 'fast_strong' tester is removed since it should just be run locally
and it can be run by passing an option to the other testers.

References to non-existing 'shaker' folder has been removed from
testing.json.


Change-Id: Ibcc306f7b27d06b9637c205238bc408194f1d062
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/184787
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-02-18 12:29:18 +00:00
Johnni Winther 3f6af87cd4 [cfe] Use declared nullability in replacement visitors
Legacy erasure on FutureOr<T*> would not yield FutureOr<T*>* as intended.

Change-Id: Ie2ec44900ddd2ee0daa7fd8a5b655e568153b59f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162640
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-09-14 08:40:39 +00:00
Dmitry Stefantsov 929d5e4a98 [cfe,ddc,dart2js,vm] Add FutureOrType
This CL is the sum of the following 5 CLs:
* https://dart-review.googlesource.com/c/sdk/+/149297/
* https://dart-review.googlesource.com/c/sdk/+/149299/
* https://dart-review.googlesource.com/c/sdk/+/149320/
* https://dart-review.googlesource.com/c/sdk/+/149321/
* https://dart-review.googlesource.com/c/sdk/+/149323/

The reason for landing the 5 CLs as one CL is to prevent potential
troubles with bisecting over the branch because the change is fully
functional only with all 5 CLs.

Closes #40123.

Bug: https://github.com/dart-lang/sdk/issues/40123
Change-Id: Ice52250a98acfe455b1d7fa5bb0624c115ca5dac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150934
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-06-15 12:18:46 +00:00
Johnni Winther c10b41a4e2 [kernel] Add DartType.toTypeText and Constant.toConstantText
These are used to provide a testable textual representation
of types and constants that do not rely upon Node.toString.

Change-Id: Iff77ebb44e8299b262f4f263666b2e1d4dd5794b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/147909
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-05-18 11:48:20 +00:00
Johnni Winther 25060e63c6 [cfe] Add tool for updating all id-tests and expectation tests
Change-Id: I191ebe0d59d44055a6818505db0112d3a452bdbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141242
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-03-27 14:52:20 +00:00
Paul Berry 99d9a77be8 Get rid of promotedType=none annotations
These turned out to be really unweildy.  Besides, they aren't
necessary since the test framework will flag a failure if a type gets
promoted when it is not expected to be.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2865403007 .
2017-05-11 11:14:23 -07:00
Paul Berry 17c23be470 Set MethodInvocation.interfaceTarget during type inference.
We need to compute the interface target in order to do the inference
anyway, so this is a reasonable time to store it.

Also annotate the inference tests with interface targets so that we
can verify that the interface targets computed by analyzer match those
computed by Fasta.  Note that this causes a few strong mode tests to
fail that were previously passing, due to the fact that type inference
in Fasta is incomplete.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2874033003 .
2017-05-10 14:31:05 -07:00
Paul Berry 22f68e6450 Fix annotation of generic method invocations in Fasta inference tests (again).
In c8026439dc, I was overzealous and
annotated all generic method invocation parameters, whether they were
inferred or explicit.  We just want to annotate the inferred ones.

R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2866363004 .
2017-05-10 10:21:44 -07:00
Paul Berry c8026439dc Fix annotation of generic method invocations in Fasta inference tests.
Note that one Fasta test starts failing as a result of this change,
due to the fact that the Fasta type inference logic is not yet
complete.

R=danrubel@google.com

Review-Url: https://codereview.chromium.org/2867253004 .
2017-05-09 15:25:20 -07:00
Leaf Petersen 006c22d0a2 Re-remove ad hoc Future.then inference.
Ad hoc inference for Future.then (and overrides) was kept in place for
an extra release cycle to allow code that implemented the Future
interface to work both before and after the transition to using
FutureOr for the callback return type.  This CL removes support for
this ad hoc inference.

BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2859703004 .
2017-05-04 10:45:21 -07:00
Konstantin Shcheglov 3a612c7b73 Generated front_end/testcases/inference test files from Analyzer tests.
Only *.strong.expect files are included.
The tests are marked as failing for compile/, kompile/ and outline/.
I could generate them, but I don't think that these results are
actually "expected", it'd more like the "status quo".

R=ahe@google.com, paulberry@google.com
BUG=

Review-Url: https://codereview.chromium.org/2846103002 .
2017-04-27 14:32:31 -07:00