dart-sdk/tests/language
Paul Berry 80bc65bb0b Flow analysis: add field promotion support for cascades.
This change updates the flow analysis support for field promotion
(which is not yet switched on by default) so that it supports field
accesses inside cascade expressions. The key moving parts are:

- The type hierarchy `PropertyTarget` (which is used by the client to
  tell flow analysis whether the target of a property access is
  `this`, `super`, or an ordinary expression) now has a new class,
  `CascadePropertyTarget`, to represent the situation where the target
  of the property access is an implicit reference to the target of the
  innermost enclosing cascade expression.

- Flow analysis has two new methods on its API:
  `cascadeExpression_afterTarget` and `cascadeExpression_end`, so that
  the client can inform flow analysis when a cascade expression is
  being analyzed.

- Flow analysis uses its `_makeTemporaryReference` method to track the
  implicit temporary variable that stores the target of cascade
  expressions. (This method was developed as part of flow analysis
  support for patterns, where it creates the data structures necessary
  to track the implicit variables that are created as part of pattern
  desugaring).

- The "mini-AST" pseudo-language used by flow analysis unit tests now
  has a way to represent cascade expressions and method invocations.

- In addition to unit tests for `_fe_analyzer_shared`, `analyzer`, and
  `front_end`, there are new language tests in
  `tests/language/inference_update_2` to test cascaded field
  promotions in end-to-end fashion.

Bug: https://github.com/dart-lang/language/issues/2020
Change-Id: I21353bbc884ed599cb1739cecfb68ad1d975d18b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/309220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2023-06-17 08:13:20 +00:00
..
abstract
accessor_conflict
argument
assert
assign
async
async_nested
async_star
await
bool
call
canonicalize
cascade
class
class_modifiers Breaking changes for analyzer version 6.0.0 2023-06-16 16:31:27 +00:00
closure
compile_time_constant
const
const_functions
constants_2018
constructor
control_flow_collections
covariant
covariant_override
deferred
double
double_literals
dynamic
enum
exception
export
extension_methods
external_abstract_fields
factory
field
final
function
function_subtype
function_type
generic
generic_methods
getter
identifier
identity
if
if_null
implicit_creation
implicit_downcast_during
import
inference
inference_update_1
inference_update_2 Flow analysis: add field promotion support for cascades. 2023-06-17 08:13:20 +00:00
initializing_formal
instance
instantiate_to_bound
interceptor
interface
invalid_returns
is
label
lazy
least_upper_bound
library
list
loop
main
malbounded
malformed
map
metadata
method Breaking changes for analyzer version 6.0.0 2023-06-16 16:31:27 +00:00
mixin
mixin_constructor_forwarding
mixin_declaration
mixin_legacy
named_arguments_anywhere
new
nnbd
no_such_method
nonfunction_type_aliases
nosuchmethod_forwarding
null
null_aware
number Breaking changes for analyzer version 6.0.0 2023-06-16 16:31:27 +00:00
operator
optimize
override
parameter
part
patterns Breaking changes for analyzer version 6.0.0 2023-06-16 16:31:27 +00:00
prefix
private
propagate
records
redirecting
reg_exp
regress
resolution
return
rewrite
scaling
script
sealed_class Breaking changes for analyzer version 6.0.0 2023-06-16 16:31:27 +00:00
set_literals
setter
spread_collections
stack_trace
static
string
subtyping_static
super
superinterface_variance
switch
symbol
sync_star
syntax
this
top_level
type
type_object
type_promotion
type_variable
typedef
unsorted
value_class
variable
variance
vm
void
why_not_promoted
await_type_error_test.dart
await_type_test.dart
dynamic_type_helper.dart
explicit_type_instantiation_parsing_test.dart
language.status
language_analyzer.status
language_dart2js.status
language_dart2wasm.status
language_dartdevc.status
language_kernel.status
language_precompiled.status
language_spec_parser.status
language_vm.status
library1.dart
library2.dart
library10.dart
library11.dart
library12.dart
record_literal_problems_test.dart
record_literal_test.dart
record_type_empty_problems_test.dart
record_type_problems_test.dart
record_type_test.dart
static_type_helper.dart
static_weak_reference_error_test.dart
static_weak_reference_function_apply_test.dart
static_weak_reference_test.dart
syntax_helper.dart