We have decided to move to a different API for Fasta/Analyzer
integration, one that doesn't involve compiling to Kernel or observing
type inference. The listener API will become broken, so let's just
remove it before that happens.
We lose the ability to trace type inference so let's restore that
ability next. The analyzer's resolution storer is not used, but that
code has been left. The resolution applier will no longer work
without the resolution storer, so those tests have been disabled.
Change-Id: If9ac5aba2d5de7788d8a65f7fa8410599e636d21
Reviewed-on: https://dart-review.googlesource.com/42400
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Fixes#31586.
Note that none of the back-ends handle Instantiation nodes yet, so the
language_2 tests added in this CL
(instantiate_tearoff_after_contravariance_check_test,
instantiate_tearoff_of_call_test, and instantiate_tearoff_test) fail
pretty much across the board right now.
Includes two fixes to Instantiation.getStaticType and the kernel type checker:
- Previously, they attempted to perform substitution on the full
function type, which had no effect because the type parameters were
bound.
- The type checker was not checking that type parameter bounds were
satisfied.
Note that the front end doesn't yet check that type parameter bounds
are satisfied by the inferred type parameters. I will address that in
a follow-up CL.
Change-Id: Ib0ad7a5fc5f4a2fdc8c99abe1f2d3d15b21a4974
Reviewed-on: https://dart-review.googlesource.com/29744
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This should fix the issue 30917 flakiness.
The reason why the tests were failing is that the code in the tests
was not quite correct Dart code, so Fasta generated a synthetic
`#errors` top-level variable with fileUri == null. We should skip
this field because it is not a part of any unit, because its fileUri
is not the fileUri of any unit.
But we lose fileUri for a Node if Program.uriToSource does not
include this URI. So, if we clear uriToSource in KernelDriver, we
lose all the file URIs. So, now we keep sources for the cycle files.
The reason for flakiness is because of the same race condition
between analyzing AnalysisDriver.addFile() and getResult(). If
we process getResult() before, we don't have to read the library
kernel file, we just create in first time, and fileUri(s) are
valid.
R=ahe@google.com, paulberry@google.com, sigmund@google.com
Bug: https://github.com/dart-lang/sdk/issues/30917
Change-Id: Ie559cf2a8a778ebf4a9e297f5cb13d30a98b5a3c
Reviewed-on: https://dart-review.googlesource.com/9744
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Some pain points are:
1. It is a breaking change. I think I will break it even more by removing
FunctionTypeAliasElement altogether.
2. We lose ability to keep track that this FunctionType is instantiation
of a typedef. Just like in Kernel.
3. We sometimes have to look up to see if the GenericFunctionTypeElement
is a function in a named GenericTypeAliasElement.
R=brianwilkerson@google.com, paulberry@google.com
Bug:
Change-Id: Ib250cc446a0ed5b8969f16f7cc6293ef4acf01a8
Reviewed-on: https://dart-review.googlesource.com/9421
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Factory constructors are represented as static Procedure(s) with
type parameters. This does not match to the language specification and
Analyzer element model. We need to pretend that these type parameters
are absent, so that we pick up the same named type parameters from the
enclosing class.
R=brianwilkerson@google.com, paulberry@google.com
Bug:
Change-Id: Id26cf0e9c08699ac46978e14640e01089a1efcbc
Reviewed-on: https://dart-review.googlesource.com/9080
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
These tests have flaky failures on the buildbots and commit queue.
Revert "Run all *_driver tests also with Kernel."
This reverts commit d2f887e37b.
Revert "Adjusted status for analyzer/test/generated/strong_mode_kernel_test"
This reverts commit 055654e96d.
Revert "Made status for strong_mode_kernel_test broader (flaky)."
This reverts commit 824c3f56cc.
Bug:
Change-Id: I341762671efc31f168df2f5806653d9548bd43ae
Reviewed-on: https://dart-review.googlesource.com/7708
Reviewed-by: William Hesse <whesse@google.com>