dart-sdk/tests/language/constructor
Kallen Tu ba005169c5 [analyzer] Initial refactor of _InstanceCreationEvaluator to return Constant value.
evaluateConstructorCall now returns a Constant, which means evaluation may be cut early in some places if there's an error. However, some code generators rely on _InstanceCreationEvaluator to complete, and so there's no _major_ changes to the design right now (and some small additions to avoid breaking many tests).

This CL is just the framework for the "return Constant" design and will be the base for reporting better errors in constructor invocations.

These changes already show that we cut some amount of over-reporting in our existing language and unit tests, which is a step in the right direction.

Bug: https://github.com/dart-lang/sdk/issues/47603, https://github.com/dart-lang/sdk/issues/47351, https://github.com/dart-lang/sdk/issues/49389

Change-Id: I5ba7f1282658884c18a32d5e98c7804bbfeac0f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/312347
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2023-07-25 19:23:02 +00:00
..
bad_constructor_runtime_1_test.dart
bad_constructor_runtime_test.dart
bad_constructor_test.dart
bad_named_constructor_runtime_test.dart
bad_named_constructor_test.dart
body_test.dart
bodyless_wrong_arg_runtime_test.dart
bodyless_wrong_arg_test.dart [analyzer] Initial refactor of _InstanceCreationEvaluator to return Constant value. 2023-07-25 19:23:02 +00:00
call_as_function_test.dart
call_wrong_argument_count_runtime_test.dart
call_wrong_argument_count_test.dart [analyzer] NOT_ENOUGH_POSITIONAL_ARGUMENTS 2022-10-11 17:56:11 +00:00
constructor2_test.dart
constructor3_test.dart
constructor4_test.dart
constructor5_test.dart Remove uses of : as default value separator in some tests/ directories. 2022-09-07 14:49:17 +00:00
constructor6_test.dart
constructor7_test.dart
constructor8_test.dart
constructor9_runtime_test.dart
constructor9_test.dart Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
constructor10_runtime_test.dart
constructor10_test.dart
constructor11_test.dart
constructor12_lib.dart [tests] Break test into weak and strong versions 2020-04-24 01:03:52 +00:00
constructor12_strong_test.dart [tests] Break test into weak and strong versions 2020-04-24 01:03:52 +00:00
constructor12_test.dart [tests] Break test into weak and strong versions 2020-04-24 01:03:52 +00:00
constructor12_weak_test.dart [tests] Break test into weak and strong versions 2020-04-24 01:03:52 +00:00
constructor13_runtime_test.dart
constructor13_test.dart [analyzer] NOT_ENOUGH_POSITIONAL_ARGUMENTS 2022-10-11 17:56:11 +00:00
constructor_test.dart
cyclic_constructor_test.dart
cyclic_runtime_test.dart
default_class_implicit_constructor_test.dart
default_factory2_runtime_test.dart
default_factory2_test.dart [cfe] Create normal bodies for redirecting factories 2021-08-04 17:51:07 +00:00
default_factory3_test.dart
default_factory_library.dart
default_factory_library_test.dart
default_factory_runtime_test.dart
default_factory_test.dart Move errors from StaticWarningCode to CompileTimeErrorCode. 2020-07-26 04:19:25 +00:00
default_test.dart
duplicate_final_test.dart
duplicate_initializers_runtime_test.dart
duplicate_initializers_test.dart Unify duplicate_field_formal_parameter and final_initialized_multiple_times 2021-04-27 17:32:18 +00:00
duplicate_runtime_test.dart
duplicate_test.dart
evaluation_redirecting_constructor_test.dart
example_constructor_test.dart
explicit_instantiation_syntax_test.dart [tests] Remove obsolete Dart 3.0 experiments from language tests 2023-06-15 08:26:27 +00:00
external_constructor_test.dart [vm] Throw error from external functions even if they have a body 2022-09-09 14:18:34 +00:00
forwarding_factory_constructor_default_values_test.dart Remove uses of : as default value separator in some tests/ directories. 2022-09-07 14:49:17 +00:00
implicit_super_constructor_call_test.dart Remove uses of : as default value separator in some tests/ directories. 2022-09-07 14:49:17 +00:00
implicit_super_constructor_test.dart
inference_super_constructor_call_test.dart
initializer_test.dart
missing_const_constructor_test.dart
missing_initializer_test.dart Clean up a number of 2.19 opt outs in language tests. 2023-03-17 16:17:50 +00:00
multiple_field_assignment_constructor_test.dart [test] Replace non-implemented @DontInline() annotations 2021-07-26 13:22:31 +00:00
name_clash_lib.dart
name_clash_test.dart
name_test.dart
named_arguments_test.dart Remove uses of : as default value separator in some tests/ directories. 2022-09-07 14:49:17 +00:00
named_constructor_test.dart Fix analyzerCode corresponding to CFE error ConstructorWithTypeArguments. 2021-09-17 10:48:59 +00:00
named_lib.dart
named_runtime_test.dart
no_such_constructor_runtime_test.dart
no_such_constructor_test.dart [Analyzer] Report EXTRA_POSITIONAL_ARGUMENTS and EXTRA_POSITIONAL_ARGUMENTS_COULD_BE_NAMED against first unmatched argument 2021-01-11 18:46:26 +00:00
non_const_constructor_without_body_test.dart
non_parameterized_factory2_test.dart
non_parameterized_factory_test.dart
patch_tear_off_test.dart [cfe] Handle tear-offs of patched constructors 2022-04-25 15:50:47 +00:00
redirect2_runtime_test.dart
redirect2_test.dart [cfe] Add more compiler-time errors for incorrect enum constructors 2022-01-28 15:07:02 +00:00
redirect_cycle_runtime_test.dart
redirect_cycle_test.dart
redirect_indirect_cycle_runtime_test.dart
redirect_indirect_cycle_test.dart
redirect_runtime_test.dart
redirect_test.dart
reference_runtime_1_test.dart
reference_runtime_2_test.dart
reference_runtime_3_test.dart
reference_runtime_4_test.dart
reference_runtime_5_test.dart
reference_runtime_6_test.dart
reference_runtime_7_test.dart
reference_runtime_8_test.dart
reference_runtime_9_test.dart
reference_runtime_10_test.dart
reference_runtime_11_test.dart
reference_runtime_12_test.dart
reference_runtime_test.dart
reference_test.dart [cfe] Check for misplaced type arguments on implicit creation expression 2021-10-28 19:21:39 +00:00
return_runtime_test.dart
return_test.dart
setter_test.dart Migrate "c" directory language tests off @compile-error. 2023-04-20 19:10:58 +00:00
tear_off_test.dart Fixed various typos in a lot of files 2022-07-25 12:21:59 +00:00
type_parameter_runtime_test.dart
type_parameter_test.dart
unnamed_new_error_test.dart Remove references to constructor-tearoff experiment. 2021-11-11 14:04:43 +00:00
unnamed_new_test.dart Remove references to constructor-tearoff experiment. 2021-11-11 14:04:43 +00:00
unresolved_default_constructor_test.dart [cfe] Add UnresolvedKind for fine grained unresolved reporting 2021-08-25 09:51:54 +00:00
unresolved_default_runtime_test.dart
unresolved_in_factory_test.dart Migrate "c" directory language tests off @compile-error. 2023-04-20 19:10:58 +00:00
with_mixin_test.dart Clean up a number of 2.19 opt outs in language tests. 2023-03-17 16:17:50 +00:00
with_type_parameters_test.dart