dart-sdk/tests/language/nnbd
Johnni Winther 5493d42be3 [cfe] Throw error for null in non-nullable switch in weak mode
This adds thrown exception in weak-mode for exhaustive switch
expressions and statements to catch the unsound `null` values.

Closes #51769
Closes #51053

Change-Id: Ieb89e65f51e84853510fc320b64db01a80a262ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289600
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-03-22 10:30:24 +00:00
..
boolean_conversion Spelling tools 2023-01-09 15:48:57 +00:00
const Add regression test for issue #43281 2020-09-03 00:38:52 +00:00
definite_assignment Remove extra the, be and of 2021-10-20 09:29:01 +00:00
experiment_release_version Spelling sdk 2023-01-20 12:37:49 +00:00
extreme_bounds [Language] Enable null safety in Dart 2.12. 2020-10-29 18:25:56 +00:00
flow_analysis [cfe] Throw error for null in non-nullable switch in weak mode 2023-03-22 10:30:24 +00:00
inference [cfe] Fix missing case of using receiver type instead of bound 2020-10-30 16:33:51 +00:00
is_type_test [ddc] Fix is type tests on nullable types 2020-07-27 23:32:18 +00:00
late Add language tests for some late instance variable corner cases. 2021-06-02 23:21:24 +00:00
mixed_inheritance pre-emptively fix some tests for class modifiers flag flip 2023-03-01 20:11:25 +00:00
never Spelling tests 2023-01-19 16:24:29 +00:00
normalization [ddc] Fix bug in FutureOr type normalization 2022-10-03 20:09:38 +00:00
null_assertions [ddc] Avoid null check on forwarding field setters 2022-11-29 21:49:15 +00:00
required_named_parameters [vm] Fix ArgumentsDescriptor uses in DoArgumentTypesMatch. 2020-11-16 11:53:39 +00:00
resolution analyzer: Improve span of use_of_nullable_value errors 2021-04-02 02:43:48 +00:00
static_errors [3.0 alpha] Remove deprecated dart:core List() constructor. 2022-12-15 11:36:22 +00:00
subtyping Spelling tests 2023-01-19 16:24:29 +00:00
syntax [3.0 alpha][test] Remove use of NullThrownError 2022-12-15 23:33:18 +00:00
top_merge Fix top_merge tests. 2020-04-10 01:05:41 +00:00
try_catch Move codes from StaticTypeWarningCode into CompileTimeErrorCode. 2020-07-27 16:44:15 +00:00
type_equality [ddc] Fix type parameters in tear offs 2020-06-10 23:49:43 +00:00
type_object Skip mixed-mode tests under language/nnbd in strong mode. 2020-05-21 17:34:43 +00:00
type_promotion analyzer: Improve span of use_of_nullable_value errors 2021-04-02 02:43:48 +00:00
typedef [cfe] Special case Null in assignability errors. 2020-11-09 11:07:44 +00:00
constant_null_safety_mode_test.dart Rename is{Strong,Weak}Mode to has{Sound,Unsound}NullSafety 2020-11-05 14:26:53 +00:00
operator_type_test.dart Spelling tests 2023-01-19 16:24:29 +00:00