From d779021ae6d96971f1fbfb5774c39312fdf19f45 Mon Sep 17 00:00:00 2001 From: "Sergey G. Grekhov" Date: Tue, 27 Jun 2023 09:18:22 +0300 Subject: [PATCH 1/2] Fixes #2099. Add subtyping tests for function type with required named arguments --- ...ction_types_arguments_binding_A01_t01.dart | 17 +- ...ction_types_arguments_binding_A01_t02.dart | 17 +- ...ction_types_arguments_binding_A01_t03.dart | 17 +- ...ction_types_arguments_binding_A02_t01.dart | 17 +- ...ction_types_arguments_binding_A02_t02.dart | 17 +- ...ction_types_arguments_binding_A02_t03.dart | 17 +- ...ction_types_arguments_binding_A03_t01.dart | 17 +- ...ction_types_arguments_binding_A03_t02.dart | 17 +- ...ction_types_arguments_binding_A03_t03.dart | 17 +- ...ction_types_arguments_binding_A04_t01.dart | 17 +- ...ction_types_arguments_binding_A04_t02.dart | 17 +- ...ction_types_arguments_binding_A04_t03.dart | 17 +- ...ction_types_arguments_binding_A05_t01.dart | 17 +- ...ction_types_arguments_binding_A05_t02.dart | 17 +- ...ction_types_arguments_binding_A05_t03.dart | 17 +- ...ction_types_arguments_binding_A06_t01.dart | 133 ++++++++ ...ction_types_arguments_binding_A06_t02.dart | 137 ++++++++ ...ction_types_arguments_binding_A06_t03.dart | 105 ++++++ ...d_function_types_class_member_A01_t01.dart | 17 +- ...d_function_types_class_member_A01_t02.dart | 17 +- ...d_function_types_class_member_A01_t03.dart | 17 +- ...d_function_types_class_member_A02_t01.dart | 17 +- ...d_function_types_class_member_A02_t02.dart | 17 +- ...d_function_types_class_member_A02_t03.dart | 17 +- ...d_function_types_class_member_A03_t01.dart | 17 +- ...d_function_types_class_member_A03_t02.dart | 17 +- ...d_function_types_class_member_A03_t03.dart | 17 +- ...d_function_types_class_member_A04_t01.dart | 17 +- ...d_function_types_class_member_A04_t02.dart | 17 +- ...d_function_types_class_member_A04_t03.dart | 17 +- ...d_function_types_class_member_A05_t01.dart | 17 +- ...d_function_types_class_member_A05_t02.dart | 17 +- ...d_function_types_class_member_A05_t03.dart | 17 +- ...d_function_types_class_member_A06_t01.dart | 135 ++++++++ ...d_function_types_class_member_A06_t02.dart | 117 +++++++ ...d_function_types_class_member_A06_t03.dart | 86 +++++ ...s_fail_arguments_binding_fail_A06_t01.dart | 224 +++++++++++++ ...s_fail_arguments_binding_fail_A06_t02.dart | 315 ++++++++++++++++++ ...s_fail_arguments_binding_fail_A06_t03.dart | 278 ++++++++++++++++ ...s_fail_arguments_binding_fail_A11_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A11_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A11_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A12_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A12_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A12_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A21_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A21_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A21_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A22_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A22_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A22_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A23_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A23_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A23_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A31_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A31_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A31_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A32_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A32_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A32_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A33_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A33_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A33_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A41_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A41_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A41_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A42_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A42_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A42_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A43_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A43_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A43_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A51_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A51_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A51_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A52_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A52_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A52_t03.dart | 17 +- ...s_fail_arguments_binding_fail_A53_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A53_t02.dart | 17 +- ...s_fail_arguments_binding_fail_A53_t03.dart | 17 +- ..._types_fail_class_member_fail_A06_t01.dart | 264 +++++++++++++++ ..._types_fail_class_member_fail_A06_t02.dart | 161 +++++++++ ..._types_fail_class_member_fail_A06_t03.dart | 116 +++++++ ..._types_fail_class_member_fail_A11_t01.dart | 17 +- ..._types_fail_class_member_fail_A11_t02.dart | 17 +- ..._types_fail_class_member_fail_A11_t03.dart | 17 +- ..._types_fail_class_member_fail_A12_t01.dart | 17 +- ..._types_fail_class_member_fail_A12_t02.dart | 17 +- ..._types_fail_class_member_fail_A12_t03.dart | 17 +- ..._types_fail_class_member_fail_A21_t01.dart | 17 +- ..._types_fail_class_member_fail_A21_t02.dart | 17 +- ..._types_fail_class_member_fail_A21_t03.dart | 17 +- ..._types_fail_class_member_fail_A22_t01.dart | 17 +- ..._types_fail_class_member_fail_A22_t02.dart | 17 +- ..._types_fail_class_member_fail_A22_t03.dart | 17 +- ..._types_fail_class_member_fail_A23_t01.dart | 17 +- ..._types_fail_class_member_fail_A23_t02.dart | 17 +- ..._types_fail_class_member_fail_A23_t03.dart | 17 +- ..._types_fail_class_member_fail_A31_t01.dart | 17 +- ..._types_fail_class_member_fail_A31_t02.dart | 17 +- ..._types_fail_class_member_fail_A31_t03.dart | 17 +- ..._types_fail_class_member_fail_A32_t01.dart | 17 +- ..._types_fail_class_member_fail_A32_t02.dart | 17 +- ..._types_fail_class_member_fail_A32_t03.dart | 17 +- ..._types_fail_class_member_fail_A33_t01.dart | 17 +- ..._types_fail_class_member_fail_A33_t02.dart | 17 +- ..._types_fail_class_member_fail_A33_t03.dart | 17 +- ..._types_fail_class_member_fail_A41_t01.dart | 17 +- ..._types_fail_class_member_fail_A41_t02.dart | 17 +- ..._types_fail_class_member_fail_A41_t03.dart | 17 +- ..._types_fail_class_member_fail_A42_t01.dart | 17 +- ..._types_fail_class_member_fail_A42_t02.dart | 17 +- ..._types_fail_class_member_fail_A42_t03.dart | 17 +- ..._types_fail_class_member_fail_A43_t01.dart | 17 +- ..._types_fail_class_member_fail_A43_t02.dart | 17 +- ..._types_fail_class_member_fail_A43_t03.dart | 17 +- ..._types_fail_class_member_fail_A51_t01.dart | 17 +- ..._types_fail_class_member_fail_A51_t02.dart | 17 +- ..._types_fail_class_member_fail_A51_t03.dart | 17 +- ..._types_fail_class_member_fail_A52_t01.dart | 17 +- ..._types_fail_class_member_fail_A52_t02.dart | 17 +- ..._types_fail_class_member_fail_A52_t03.dart | 17 +- ..._types_fail_class_member_fail_A53_t01.dart | 17 +- ..._types_fail_class_member_fail_A53_t02.dart | 17 +- ..._types_fail_class_member_fail_A53_t03.dart | 17 +- ...pes_fail_global_variable_fail_A06_t01.dart | 88 +++++ ...pes_fail_global_variable_fail_A11_t01.dart | 17 +- ...pes_fail_global_variable_fail_A12_t01.dart | 17 +- ...pes_fail_global_variable_fail_A21_t01.dart | 17 +- ...pes_fail_global_variable_fail_A22_t01.dart | 17 +- ...pes_fail_global_variable_fail_A23_t01.dart | 17 +- ...pes_fail_global_variable_fail_A31_t01.dart | 17 +- ...pes_fail_global_variable_fail_A32_t01.dart | 17 +- ...pes_fail_global_variable_fail_A33_t01.dart | 17 +- ...pes_fail_global_variable_fail_A41_t01.dart | 17 +- ...pes_fail_global_variable_fail_A42_t01.dart | 17 +- ...pes_fail_global_variable_fail_A43_t01.dart | 17 +- ...pes_fail_global_variable_fail_A51_t01.dart | 17 +- ...pes_fail_global_variable_fail_A52_t01.dart | 17 +- ...pes_fail_global_variable_fail_A53_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A06_t01.dart | 88 +++++ ...ypes_fail_local_variable_fail_A11_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A12_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A21_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A22_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A23_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A31_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A32_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A33_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A41_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A42_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A43_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A51_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A52_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A53_t01.dart | 17 +- ..._types_fail_return_value_fail_A06_t01.dart | 90 +++++ ..._types_fail_return_value_fail_A11_t01.dart | 17 +- ..._types_fail_return_value_fail_A12_t01.dart | 17 +- ..._types_fail_return_value_fail_A21_t01.dart | 17 +- ..._types_fail_return_value_fail_A22_t01.dart | 17 +- ..._types_fail_return_value_fail_A23_t01.dart | 17 +- ..._types_fail_return_value_fail_A31_t01.dart | 17 +- ..._types_fail_return_value_fail_A32_t01.dart | 17 +- ..._types_fail_return_value_fail_A33_t01.dart | 17 +- ..._types_fail_return_value_fail_A41_t01.dart | 17 +- ..._types_fail_return_value_fail_A42_t01.dart | 17 +- ..._types_fail_return_value_fail_A43_t01.dart | 17 +- ..._types_fail_return_value_fail_A51_t01.dart | 17 +- ..._types_fail_return_value_fail_A52_t01.dart | 17 +- ..._types_fail_return_value_fail_A53_t01.dart | 17 +- ...unction_types_global_variable_A01_t01.dart | 17 +- ...unction_types_global_variable_A02_t01.dart | 17 +- ...unction_types_global_variable_A03_t01.dart | 17 +- ...unction_types_global_variable_A04_t01.dart | 17 +- ...unction_types_global_variable_A05_t01.dart | 17 +- ...unction_types_global_variable_A06_t01.dart | 70 ++++ ...function_types_local_variable_A01_t01.dart | 17 +- ...function_types_local_variable_A02_t01.dart | 17 +- ...function_types_local_variable_A03_t01.dart | 17 +- ...function_types_local_variable_A04_t01.dart | 17 +- ...function_types_local_variable_A05_t01.dart | 17 +- ...function_types_local_variable_A06_t01.dart | 75 +++++ ...d_function_types_return_value_A01_t01.dart | 17 +- ...d_function_types_return_value_A02_t01.dart | 17 +- ...d_function_types_return_value_A03_t01.dart | 17 +- ...d_function_types_return_value_A04_t01.dart | 17 +- ...d_function_types_return_value_A05_t01.dart | 17 +- ...d_function_types_return_value_A06_t01.dart | 75 +++++ ...ction_types_arguments_binding_A01_t01.dart | 17 +- ...ction_types_arguments_binding_A01_t02.dart | 17 +- ...ction_types_arguments_binding_A01_t03.dart | 17 +- ...ction_types_arguments_binding_A02_t01.dart | 17 +- ...ction_types_arguments_binding_A02_t02.dart | 17 +- ...ction_types_arguments_binding_A02_t03.dart | 17 +- ...ction_types_arguments_binding_A03_t01.dart | 17 +- ...ction_types_arguments_binding_A03_t02.dart | 17 +- ...ction_types_arguments_binding_A03_t03.dart | 17 +- ...ction_types_arguments_binding_A04_t01.dart | 17 +- ...ction_types_arguments_binding_A04_t02.dart | 17 +- ...ction_types_arguments_binding_A04_t03.dart | 17 +- ...ction_types_arguments_binding_A05_t01.dart | 17 +- ...ction_types_arguments_binding_A05_t02.dart | 17 +- ...ction_types_arguments_binding_A05_t03.dart | 17 +- ...ction_types_arguments_binding_A06_t01.dart | 120 +++++++ ...ction_types_arguments_binding_A06_t02.dart | 136 ++++++++ ...ction_types_arguments_binding_A06_t03.dart | 103 ++++++ ...d_function_types_class_member_A01_t01.dart | 17 +- ...d_function_types_class_member_A01_t02.dart | 17 +- ...d_function_types_class_member_A01_t03.dart | 17 +- ...d_function_types_class_member_A02_t01.dart | 17 +- ...d_function_types_class_member_A02_t02.dart | 17 +- ...d_function_types_class_member_A02_t03.dart | 17 +- ...d_function_types_class_member_A03_t01.dart | 17 +- ...d_function_types_class_member_A03_t02.dart | 17 +- ...d_function_types_class_member_A03_t03.dart | 17 +- ...d_function_types_class_member_A04_t01.dart | 17 +- ...d_function_types_class_member_A04_t02.dart | 17 +- ...d_function_types_class_member_A04_t03.dart | 17 +- ...d_function_types_class_member_A05_t01.dart | 17 +- ...d_function_types_class_member_A05_t02.dart | 17 +- ...d_function_types_class_member_A05_t03.dart | 17 +- ...d_function_types_class_member_A06_t01.dart | 99 ++++++ ...d_function_types_class_member_A06_t02.dart | 82 +++++ ...d_function_types_class_member_A06_t03.dart | 63 ++++ ...s_fail_arguments_binding_fail_A06_t01.dart | 173 ++++++++++ ...s_fail_arguments_binding_fail_A11_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A12_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A21_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A22_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A23_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A31_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A32_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A33_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A41_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A42_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A43_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A51_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A52_t01.dart | 17 +- ...s_fail_arguments_binding_fail_A53_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A06_t01.dart | 181 ++++++++++ ..._arguments_binding_mixin_fail_A11_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A12_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A21_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A22_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A23_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A31_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A32_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A33_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A41_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A42_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A43_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A51_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A52_t01.dart | 17 +- ..._arguments_binding_mixin_fail_A53_t01.dart | 17 +- ..._arguments_binding_super_fail_A06_t01.dart | 214 ++++++++++++ ..._arguments_binding_super_fail_A11_t01.dart | 17 +- ..._arguments_binding_super_fail_A12_t01.dart | 17 +- ..._arguments_binding_super_fail_A21_t01.dart | 17 +- ..._arguments_binding_super_fail_A22_t01.dart | 17 +- ..._arguments_binding_super_fail_A23_t01.dart | 17 +- ..._arguments_binding_super_fail_A31_t01.dart | 17 +- ..._arguments_binding_super_fail_A32_t01.dart | 17 +- ..._arguments_binding_super_fail_A33_t01.dart | 17 +- ..._arguments_binding_super_fail_A41_t01.dart | 17 +- ..._arguments_binding_super_fail_A42_t01.dart | 17 +- ..._arguments_binding_super_fail_A43_t01.dart | 17 +- ..._arguments_binding_super_fail_A51_t01.dart | 17 +- ..._arguments_binding_super_fail_A52_t01.dart | 17 +- ..._arguments_binding_super_fail_A53_t01.dart | 17 +- ..._types_fail_class_member_fail_A06_t01.dart | 157 +++++++++ ..._types_fail_class_member_fail_A11_t01.dart | 17 +- ..._types_fail_class_member_fail_A12_t01.dart | 17 +- ..._types_fail_class_member_fail_A21_t01.dart | 17 +- ..._types_fail_class_member_fail_A22_t01.dart | 17 +- ..._types_fail_class_member_fail_A23_t01.dart | 17 +- ..._types_fail_class_member_fail_A31_t01.dart | 17 +- ..._types_fail_class_member_fail_A32_t01.dart | 17 +- ..._types_fail_class_member_fail_A33_t01.dart | 17 +- ..._types_fail_class_member_fail_A41_t01.dart | 17 +- ..._types_fail_class_member_fail_A42_t01.dart | 17 +- ..._types_fail_class_member_fail_A43_t01.dart | 17 +- ..._types_fail_class_member_fail_A51_t01.dart | 17 +- ..._types_fail_class_member_fail_A52_t01.dart | 17 +- ..._types_fail_class_member_fail_A53_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A06_t01.dart | 77 +++++ ..._fail_class_member_mixin_fail_A11_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A12_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A21_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A22_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A23_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A31_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A32_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A33_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A41_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A42_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A43_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A51_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A52_t01.dart | 17 +- ..._fail_class_member_mixin_fail_A53_t01.dart | 17 +- ..._fail_class_member_super_fail_A06_t01.dart | 96 ++++++ ..._fail_class_member_super_fail_A11_t01.dart | 17 +- ..._fail_class_member_super_fail_A12_t01.dart | 17 +- ..._fail_class_member_super_fail_A21_t01.dart | 17 +- ..._fail_class_member_super_fail_A22_t01.dart | 17 +- ..._fail_class_member_super_fail_A23_t01.dart | 17 +- ..._fail_class_member_super_fail_A31_t01.dart | 17 +- ..._fail_class_member_super_fail_A32_t01.dart | 17 +- ..._fail_class_member_super_fail_A33_t01.dart | 17 +- ..._fail_class_member_super_fail_A41_t01.dart | 17 +- ..._fail_class_member_super_fail_A42_t01.dart | 17 +- ..._fail_class_member_super_fail_A43_t01.dart | 17 +- ..._fail_class_member_super_fail_A51_t01.dart | 17 +- ..._fail_class_member_super_fail_A52_t01.dart | 17 +- ..._fail_class_member_super_fail_A53_t01.dart | 17 +- ...pes_fail_global_variable_fail_A06_t01.dart | 81 +++++ ...pes_fail_global_variable_fail_A11_t01.dart | 17 +- ...pes_fail_global_variable_fail_A12_t01.dart | 17 +- ...pes_fail_global_variable_fail_A21_t01.dart | 17 +- ...pes_fail_global_variable_fail_A22_t01.dart | 17 +- ...pes_fail_global_variable_fail_A23_t01.dart | 17 +- ...pes_fail_global_variable_fail_A31_t01.dart | 17 +- ...pes_fail_global_variable_fail_A32_t01.dart | 17 +- ...pes_fail_global_variable_fail_A33_t01.dart | 17 +- ...pes_fail_global_variable_fail_A41_t01.dart | 17 +- ...pes_fail_global_variable_fail_A42_t01.dart | 17 +- ...pes_fail_global_variable_fail_A43_t01.dart | 17 +- ...pes_fail_global_variable_fail_A51_t01.dart | 17 +- ...pes_fail_global_variable_fail_A52_t01.dart | 17 +- ...pes_fail_global_variable_fail_A53_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A06_t01.dart | 81 +++++ ...ypes_fail_local_variable_fail_A11_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A12_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A21_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A22_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A23_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A31_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A32_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A33_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A41_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A42_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A43_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A51_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A52_t01.dart | 17 +- ...ypes_fail_local_variable_fail_A53_t01.dart | 17 +- ..._types_fail_return_value_fail_A06_t01.dart | 71 ++++ ..._types_fail_return_value_fail_A11_t01.dart | 17 +- ..._types_fail_return_value_fail_A12_t01.dart | 17 +- ..._types_fail_return_value_fail_A21_t01.dart | 17 +- ..._types_fail_return_value_fail_A22_t01.dart | 17 +- ..._types_fail_return_value_fail_A23_t01.dart | 17 +- ..._types_fail_return_value_fail_A31_t01.dart | 17 +- ..._types_fail_return_value_fail_A32_t01.dart | 17 +- ..._types_fail_return_value_fail_A33_t01.dart | 17 +- ..._types_fail_return_value_fail_A41_t01.dart | 17 +- ..._types_fail_return_value_fail_A42_t01.dart | 17 +- ..._types_fail_return_value_fail_A43_t01.dart | 17 +- ..._types_fail_return_value_fail_A51_t01.dart | 17 +- ..._types_fail_return_value_fail_A52_t01.dart | 17 +- ..._types_fail_return_value_fail_A53_t01.dart | 17 +- ...unction_types_global_variable_A01_t01.dart | 17 +- ...unction_types_global_variable_A02_t01.dart | 17 +- ...unction_types_global_variable_A03_t01.dart | 17 +- ...unction_types_global_variable_A04_t01.dart | 17 +- ...unction_types_global_variable_A05_t01.dart | 17 +- ...unction_types_global_variable_A06_t01.dart | 68 ++++ ...function_types_local_variable_A01_t01.dart | 17 +- ...function_types_local_variable_A02_t01.dart | 17 +- ...function_types_local_variable_A03_t01.dart | 17 +- ...function_types_local_variable_A04_t01.dart | 17 +- ...function_types_local_variable_A05_t01.dart | 17 +- ...function_types_local_variable_A06_t01.dart | 73 ++++ ...d_function_types_return_value_A01_t01.dart | 17 +- ...d_function_types_return_value_A02_t01.dart | 17 +- ...d_function_types_return_value_A03_t01.dart | 17 +- ...d_function_types_return_value_A04_t01.dart | 17 +- ...d_function_types_return_value_A05_t01.dart | 17 +- ...d_function_types_return_value_A06_t01.dart | 63 ++++ .../test_types/named_function_types_A01.dart | 17 +- .../test_types/named_function_types_A02.dart | 17 +- .../test_types/named_function_types_A03.dart | 17 +- .../test_types/named_function_types_A04.dart | 17 +- .../test_types/named_function_types_A05.dart | 17 +- .../test_types/named_function_types_A06.dart | 38 +++ .../named_function_types_fail_A061.dart | 39 +++ .../named_function_types_fail_A11.dart | 17 +- .../named_function_types_fail_A12.dart | 17 +- .../named_function_types_fail_A21.dart | 17 +- .../named_function_types_fail_A22.dart | 17 +- .../named_function_types_fail_A23.dart | 17 +- .../named_function_types_fail_A31.dart | 17 +- .../named_function_types_fail_A32.dart | 17 +- .../named_function_types_fail_A33.dart | 17 +- .../named_function_types_fail_A41.dart | 17 +- .../named_function_types_fail_A42.dart | 17 +- .../named_function_types_fail_A43.dart | 17 +- .../named_function_types_fail_A51.dart | 17 +- .../named_function_types_fail_A52.dart | 17 +- .../named_function_types_fail_A53.dart | 17 +- 399 files changed, 8543 insertions(+), 2166 deletions(-) create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t02.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t03.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t02.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t03.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t02.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t03.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t02.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t03.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t02.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t03.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t02.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t03.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A06_t01.dart create mode 100644 LanguageFeatures/Subtyping/test_types/named_function_types_A06.dart create mode 100644 LanguageFeatures/Subtyping/test_types/named_function_types_fail_A061.dart diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t01.dart index 758c244194..a98d74b5a4 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t02.dart index 78bbfd17cd..d8c5f0d791 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t03.dart index 4694774ce1..c680b2a57c 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A01_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t01.dart index 1037dc7bc5..a2331f1e55 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t02.dart index 8a608903ce..e56352cbbf 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t03.dart index 00f19ccc2b..753d7b1dca 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A02_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t01.dart index 6c85dc454e..e079132740 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t02.dart index d93ef6dfdb..e5cbafbe8d 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t03.dart index 8148514e2b..ebc9652389 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A03_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t01.dart index 3fffe5ecce..c891e5babb 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t02.dart index 4820b46b6f..c76a92b551 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t03.dart index c891e02895..68570a3857 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A04_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t01.dart index 067d26484a..c81f0cf545 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t02.dart index 3d353c9ae3..109025aeb3 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t03.dart index ecebd3e160..53966e25fe 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A05_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t01.dart new file mode 100644 index 0000000000..dcebea707f --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t01.dart @@ -0,0 +1,133 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be used as an argument of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/arguments_binding_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; + +const t1Default = f1Instance; + +namedArgumentsFunc1(F1 t1, {F1 t2 = t1Default}) {} +positionalArgumentsFunc1(F1 t1, [F1 t2 = t1Default]) {} + +namedArgumentsFunc2(X t1, {required X t2}) {} + +class ArgumentsBindingClass { + ArgumentsBindingClass(F1 t1) {} + + ArgumentsBindingClass.named(F1 t1, {F1 t2 = t1Default}) {} + ArgumentsBindingClass.positional(F1 t1, [F1 t2 = t1Default]) {} + + factory ArgumentsBindingClass.fNamed(F1 t1, {F1 t2 = t1Default}) { + return new ArgumentsBindingClass.named(t1, t2: t2); + } + factory ArgumentsBindingClass.fPositional(F1 t1, [F1 t2 = t1Default]) { + return new ArgumentsBindingClass.positional(t1, t2); + } + + static namedArgumentsStaticMethod(F1 t1, {F1 t2 = t1Default}) {} + static positionalArgumentsStaticMethod(F1 t1, [F1 t2 = t1Default]) {} + + namedArgumentsMethod(F1 t1, {F1 t2 = t1Default}) {} + positionalArgumentsMethod(F1 t1, [F1 t2 = t1Default]) {} + + set testSetter(F1 val) {} +} + +class ArgumentsBindingGen { + ArgumentsBindingGen(X t1) {} + + ArgumentsBindingGen.named(X t1, {required X t2}) {} + + factory ArgumentsBindingGen.fNamed(X t1, {required X t2}) { + return new ArgumentsBindingGen.named(t1, t2: t2); + } + + namedArgumentsMethod(X t1, {required X t2}) {} + + set testSetter(X val) {} +} + +main() { + // test functions + namedArgumentsFunc1(forgetType(t0Instance), t2: forgetType(t0Instance)); + positionalArgumentsFunc1(forgetType(t0Instance), forgetType(t0Instance)); + + // test class constructors + ArgumentsBindingClass instance1 = + new ArgumentsBindingClass(forgetType(t0Instance)); + instance1 = new ArgumentsBindingClass.fNamed(forgetType(t0Instance), + t2: forgetType(t0Instance)); + instance1 = new ArgumentsBindingClass.named(forgetType(t0Instance), + t2: forgetType(t0Instance)); + instance1 = new ArgumentsBindingClass.positional(forgetType(t0Instance), + forgetType(t0Instance)); + + // tests methods and setters + instance1.namedArgumentsMethod(forgetType(t0Instance), + t2: forgetType(t0Instance)); + instance1.positionalArgumentsMethod(forgetType(t0Instance), + forgetType(t0Instance)); + instance1.testSetter = forgetType(t0Instance); + + // test static methods + ArgumentsBindingClass.namedArgumentsStaticMethod(forgetType(t0Instance), + t2: forgetType(t0Instance)); + ArgumentsBindingClass.positionalArgumentsStaticMethod( + forgetType(t0Instance), forgetType(t0Instance)); + + // Test type parameters + + // test generic functions + namedArgumentsFunc2(forgetType(t0Instance), t2: forgetType(t0Instance)); + + // test generic class constructors + ArgumentsBindingGen instance2 = + new ArgumentsBindingGen(forgetType(t0Instance)); + instance2 = new ArgumentsBindingGen.fNamed(forgetType(t0Instance), + t2: forgetType(t0Instance)); + instance2 = new ArgumentsBindingGen.named(forgetType(t0Instance), + t2: forgetType(t0Instance)); + + // test generic class methods and setters + instance2.namedArgumentsMethod(forgetType(t0Instance), + t2: forgetType(t0Instance)); + instance2.testSetter = forgetType(t0Instance); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t02.dart new file mode 100644 index 0000000000..2ff210a33e --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t02.dart @@ -0,0 +1,137 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be used as an argument of type T1. Test superclass members +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/arguments_binding_x02.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +class ArgumentsBindingSuper1_t02 { + F1 m; + + ArgumentsBindingSuper1_t02(F1 value): m = value {} + ArgumentsBindingSuper1_t02.named(F1 value, {F1 val2 = t1Default}): m = value {} + ArgumentsBindingSuper1_t02.positional(F1 value, [F1 val2 = t1Default]): m = value {} + ArgumentsBindingSuper1_t02.short(this.m); + + void superTest(F1 val) {} + void superTestPositioned(F1 val, [F1 val2 = t1Default]) {} + void superTestNamed(F1 val, {F1 val2 = t1Default}) {} + F1 get superGetter => m; + void set superSetter(F1 val) {} +} + +class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 { + ArgumentsBinding1_t02(dynamic t1) : super(t1) {} + ArgumentsBinding1_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {} + ArgumentsBinding1_t02.c3(dynamic t1) : super.positional(t1) {} + ArgumentsBinding1_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {} + ArgumentsBinding1_t02.c5(dynamic t1) : super.short(t1) {} + + test(dynamic t1, dynamic t2) { + superTest(t1); + superTestPositioned(t1); + superTestPositioned(t2, t1); + superTestNamed(t1); + superTestNamed(t2, val2: t1); + superSetter = t1; + m = t1; + superGetter; + } +} + +class ArgumentsBindingSuper2_t02 { + X m; + + ArgumentsBindingSuper2_t02(X value) : m = value {} + ArgumentsBindingSuper2_t02.named(X value, {required X val2}) : m = value {} + ArgumentsBindingSuper2_t02.short(this.m); + + void superTest(X val) {} + void superTestNamed(X val, {required X val2}) {} + X get superGetter => m; + void set superSetter(X val) {} +} + +class ArgumentsBinding2_t02 extends ArgumentsBindingSuper2_t02 { + ArgumentsBinding2_t02(X t1) : super(t1) {} + ArgumentsBinding2_t02.c2(X t1, X t2) : super.named(t1, val2: t2) {} + ArgumentsBinding2_t02.c5(X t1) : super.short(t1) {} + + test(X t1, X t2) { + superTest(t1); + superTestNamed(t2, val2: t1); + superSetter = t1; + m = t1; + superGetter; + } +} + +main() { + ArgumentsBinding1_t02 c1 = new ArgumentsBinding1_t02(t0Instance); + c1 = new ArgumentsBinding1_t02.c2(t1Instance, t0Instance); + c1 = new ArgumentsBinding1_t02.c3(t0Instance); + c1 = new ArgumentsBinding1_t02.c4(t1Instance, t0Instance); + c1 = new ArgumentsBinding1_t02.c5(t0Instance); + + c1.test(t0Instance, t1Instance); + c1.superTest(forgetType(t0Instance)); + c1.superTestPositioned(forgetType(t0Instance)); + c1.superTestPositioned(t1Instance, forgetType(t0Instance)); + c1.superTestNamed(forgetType(t0Instance)); + c1.superTestNamed(t1Instance, val2: forgetType(t0Instance)); + c1.superSetter = forgetType(t0Instance); + c1.superGetter; + + // Test type parameters + + ArgumentsBinding2_t02 c2 = + new ArgumentsBinding2_t02(forgetType(t0Instance)); + c2 = new ArgumentsBinding2_t02.c2(t1Instance, forgetType(t0Instance)); + c2 = new ArgumentsBinding2_t02.c5(forgetType(t0Instance)); + + c2.test(forgetType(t0Instance), t1Instance); + c2.superTest(forgetType(t0Instance)); + c2.superTestNamed(t1Instance, val2: forgetType(t0Instance)); + c2.superSetter = forgetType(t0Instance); + c2.superGetter; +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t03.dart new file mode 100644 index 0000000000..577a1ef97f --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_arguments_binding_A06_t03.dart @@ -0,0 +1,105 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be used as an argument of type T1. Test mixin members +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/arguments_binding_x03.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +mixin class ArgumentsBindingMixin1_t03 { + F1 m = t1Default; + + void superTest(F1 val) {} + void superTestPositioned(F1 val, [F1 val2 = t1Default]) {} + void superTestNamed(F1 val, {F1 val2 = t1Default}) {} + F1 get superGetter => m; + void set superSetter(F1 val) {} +} + +class ArgumentsBinding1_t03 extends Object with ArgumentsBindingMixin1_t03 { + + test(dynamic t1, dynamic t2) { + superTest(t1); + superTestPositioned(t1); + superTestPositioned(t2, t1); + superTestNamed(t1); + superTestNamed(t2, val2: t1); + superSetter = t1; + m = t1; + superGetter; + } +} + +mixin class ArgumentsBindingMixin2_t03 { + void superTest(X val) {} + void superTestNamed(X val, {required X val2}) {} + void set superSetter(X val) {} +} + +class ArgumentsBinding2_t03 extends Object with ArgumentsBindingMixin2_t03 { + + test(dynamic t1, dynamic t2) { + superTest(t1); + superTestNamed(t2, val2: t1); + superSetter = t1; + } +} + +main() { + ArgumentsBinding1_t03 c1 = new ArgumentsBinding1_t03(); + + c1.test(forgetType(t0Instance), t1Instance); + c1.superTest(forgetType(t0Instance)); + c1.superTestPositioned(forgetType(t0Instance)); + c1.superTestPositioned(t1Instance, forgetType(t0Instance)); + c1.superTestNamed(forgetType(t0Instance)); + c1.superTestNamed(t1Instance, val2: forgetType(t0Instance)); + c1.superSetter = forgetType(t0Instance); + c1.superGetter; + + // Test type parameters + ArgumentsBinding2_t03 c2 = new ArgumentsBinding2_t03(); + c2.test(forgetType(t0Instance), t1Instance); + c2.superTest(forgetType(t0Instance)); + c2.superTestNamed(t1Instance, val2: forgetType(t0Instance)); + c2.superSetter = forgetType(t0Instance); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t01.dart index 3a3d75ea1d..5e3f6766db 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t02.dart index 95f9a862a0..1aae5d949e 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t03.dart index e93e569bf6..cf4be85454 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A01_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t01.dart index 0a13d89e2e..cf601ab3be 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t02.dart index 51d7a81a9d..87cc8a1a50 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t03.dart index 281586c14c..aea47161d4 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A02_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t01.dart index ba288d7363..bf99bb4a2f 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t02.dart index 0a8c67103a..0c4e41d3dc 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t03.dart index ddfc4a202c..aebd37bb26 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A03_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t01.dart index 26c8e268c9..a012a8c93c 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t02.dart index 1383f0128d..3de0e3520e 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t03.dart index 1a9fec93d6..fe16a7f2a2 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A04_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t01.dart index 4e99cdf145..be87fc1fdc 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t02.dart index f39c1b557c..eb96b6f06f 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t03.dart index 5c58e85a90..135b980e13 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A05_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t01.dart new file mode 100644 index 0000000000..cf0e47b618 --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t01.dart @@ -0,0 +1,135 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be assigned to the class member of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/class_member_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; + +class ClassMember1_t01 { + static F1 s = forgetType(t0Instance); + F1 m = forgetType(t0Instance); + F1 _p = forgetType(t0Instance); + + ClassMember1_t01() { + s = forgetType(t0Instance); + m = forgetType(t0Instance); + _p = forgetType(t0Instance); + } + + ClassMember1_t01.named(F1 value) { + s = value; + m = value; + _p = value; + } + + ClassMember1_t01.short(this.m, this._p); + + test() { + s = forgetType(t0Instance); + m = forgetType(t0Instance); + _p = forgetType(t0Instance); + } + + set setter(F1 val) { + _p = val; + } + + F1 get getter => forgetType(_p); + + static staticTest() { + s = forgetType(t0Instance); + } + + static set staticSetter(F1 val) { + s = val; + } + + static F1 get staticGetter => forgetType(t0Instance); +} + +class ClassMember2_t01 { + X m; + X _p; + + ClassMember2_t01(): m = forgetType(t0Instance), _p = forgetType(t0Instance) { + } + + ClassMember2_t01.named(X value): m = value, _p = value { + } + + ClassMember2_t01.short(this.m, this._p); + + test(X v) { + m = v; + _p = v; + } + + set setter(X val) { + _p = val; + } + + F1 get getter => forgetType(_p); +} + +main() { + ClassMember1_t01 c1 = new ClassMember1_t01(); + c1 = new ClassMember1_t01.short(forgetType(t0Instance), + forgetType(t0Instance)); + c1 = new ClassMember1_t01.named(forgetType(t0Instance)); + c1.m = forgetType(t0Instance); + c1.test(); + c1.setter = forgetType(t0Instance); + c1.getter; + + ClassMember1_t01.s = forgetType(t0Instance); + ClassMember1_t01.staticTest(); + ClassMember1_t01.staticSetter = forgetType(t0Instance); + ClassMember1_t01.staticGetter; + + // Test type parameters + + ClassMember2_t01 c2 = new ClassMember2_t01(); + c2 = new ClassMember2_t01.short(forgetType(t0Instance), + forgetType(t0Instance)); + c2 = new ClassMember2_t01.named(forgetType(t0Instance)); + c2.m = forgetType(t0Instance); + c2.test(forgetType(t0Instance)); + c2.getter; +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t02.dart new file mode 100644 index 0000000000..c937ceb4c4 --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t02.dart @@ -0,0 +1,117 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be assigned to the superclass member of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/class_member_x02.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; + +class ClassMemberSuper1_t02 { + F1 m; + + ClassMemberSuper1_t02(dynamic value): m = value { + } + + ClassMemberSuper1_t02.named(dynamic value): m = value { + } + + ClassMemberSuper1_t02.short(this.m); + + void set superSetter(F1 val) {} +} + +class ClassMember1_t02 extends ClassMemberSuper1_t02 { + + ClassMember1_t02() : super(forgetType(t0Instance)) {} + + ClassMember1_t02.named() : super.named(forgetType(t0Instance)) {} + + ClassMember1_t02.short() : super.short(forgetType(t0Instance)); + + test() { + m = forgetType(t0Instance); + superSetter = forgetType(t0Instance); + } +} + +class ClassMemberSuper2_t02 { + X m; + + ClassMemberSuper2_t02(dynamic value): m = value { + } + + ClassMemberSuper2_t02.named(dynamic value): m = value { + } + + ClassMemberSuper2_t02.short(this.m); + + void set superSetter(X val) {} +} + +class ClassMember2_t02 extends ClassMemberSuper2_t02 { + + ClassMember2_t02() : super(forgetType(t0Instance)) {} + + ClassMember2_t02.named() : super.named(forgetType(t0Instance)) {} + + ClassMember2_t02.short() : super.short(forgetType(t0Instance)); + + test() { + m = forgetType(t0Instance); + superSetter = forgetType(t0Instance); + } +} + +main() { + ClassMember1_t02 c1 = new ClassMember1_t02(); + c1 = new ClassMember1_t02.short(); + c1 = new ClassMember1_t02.named(); + c1.m = forgetType(t0Instance); + c1.test(); + c1.superSetter = forgetType(t0Instance); + + // Test type parameters + + ClassMember2_t02 c2 = new ClassMember2_t02(); + c2 = new ClassMember2_t02.short(); + c2 = new ClassMember2_t02.named(); + c2.m = forgetType(t0Instance); + c2.test(); + c2.superSetter = forgetType(t0Instance); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t03.dart new file mode 100644 index 0000000000..daf8d21837 --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_class_member_A06_t03.dart @@ -0,0 +1,86 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be assigned to the mixin member of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/class_member_x03.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +mixin class ClassMemberMixin1_t03 { + F1 m = t1Default; + + void set superSetter(dynamic val) {} +} + +class ClassMember1_t03 extends Object with ClassMemberMixin1_t03 { + test() { + m = forgetType(t0Instance); + superSetter = forgetType(t0Instance); + } +} + +mixin class ClassMemberMixin2_t03 { + void set superSetter(dynamic val) {} +} + +class ClassMember2_t03 extends Object with ClassMemberMixin2_t03 { + X m; + ClassMember2_t03(X x): m = x { } + test() { + m = forgetType(t0Instance); + superSetter = forgetType(t0Instance); + } +} + +main() { + ClassMember1_t03 c1 = new ClassMember1_t03(); + c1.m = forgetType(t0Instance); + c1.test(); + c1.superSetter = forgetType(t0Instance); + + // Test type parameters + + ClassMember2_t03 c2 = new ClassMember2_t03(t1Instance); + c2.m = forgetType(t0Instance); + c2.test(); + c2.superSetter = forgetType(t0Instance); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart new file mode 100644 index 0000000000..ad014a83da --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart @@ -0,0 +1,224 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 not a subtype of a type T1, then it cannot +/// be used as an argument of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/arguments_binding_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; +import '../../../../Utils/expect.dart'; + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +namedArgumentsFunc1(F1 t1, {F1 t2 = t1Default}) {} +positionalArgumentsFunc1(F1 t1, [F1 t2 = t1Default]) {} + +namedArgumentsFunc2(X t1, {required X t2}) {} + +class ArgumentsBindingClass { + ArgumentsBindingClass(F1 t1) {} + + ArgumentsBindingClass.named(F1 t1, {F1 t2 = t1Default}) {} + + factory ArgumentsBindingClass.fNamed(F1 t1, {F1 t2 = t1Default}) { + return new ArgumentsBindingClass.named(t1, t2: t2); + } + factory ArgumentsBindingClass.fPositional(F1 t1, [F1 t2 = t1Default]) { + return new ArgumentsBindingClass.named(t1, t2: t2); + } + + static namedArgumentsStaticMethod(F1 t1, {F1 t2 = t1Default}) {} + static positionalArgumentsStaticMethod(F1 t1, [F1 t2 = t1Default]) {} + + namedArgumentsMethod(F1 t1, {F1 t2 = t1Default}) {} + positionalArgumentsMethod(F1 t1, [F1 t2 = t1Default]) {} + + set testSetter(F1 val) {} +} + +class ArgumentsBindingClassGen { + ArgumentsBindingClassGen(X t1) {} + + ArgumentsBindingClassGen.named(X t1, {required X t2}) {} + + factory ArgumentsBindingClassGen.fNamed(X t1, {required X t2}) { + return new ArgumentsBindingClassGen.named(t1, t2: t2); + } + + namedArgumentsMethod(X t1, {required X t2}) {} + + set testSetter(X val) {} +} + +class ArgumentsBindingClassSuper { + ArgumentsBindingClassSuper(F1 t1) {} +} + +class ArgumentsBindingDesc extends ArgumentsBindingClassSuper { + ArgumentsBindingDesc(F0 t0) : super (forgetType(t0)) {} +} + +main() { + // Test functions + Expect.throws(() { + namedArgumentsFunc1(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + namedArgumentsFunc1(t1Instance, t2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + positionalArgumentsFunc1(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + positionalArgumentsFunc1(t1Instance, forgetType(t0Instance)); + }, (e) => e is TypeError); + + // Test constructors + Expect.throws(() { + new ArgumentsBindingClass(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClass.named(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClass.named(t1Instance, t2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClass.fNamed(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClass.fNamed(t1Instance, t2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClass.fPositional(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClass.fPositional(t1Instance, forgetType(t0Instance)); + }, (e) => e is TypeError); + + // Test instance methods and setters + Expect.throws(() { + new ArgumentsBindingClass(t1Instance).namedArgumentsMethod( + forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance, + t2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod( + forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance, + forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClass(t1Instance).testSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + // Test static methods + Expect.throws(() { + ArgumentsBindingClass.namedArgumentsStaticMethod(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance, + t2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + ArgumentsBindingClass.positionalArgumentsStaticMethod( + forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance, + forgetType(t0Instance)); + }, (e) => e is TypeError); + + // Test type parameters + + // Test generic functions + Expect.throws(() { + namedArgumentsFunc2(t1Instance, t2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + // Test constructors + Expect.throws(() { + new ArgumentsBindingClassGen(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClassGen.named(t1Instance, t2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClassGen.fNamed(t1Instance, t2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + // Test instance methods and setters + Expect.throws(() { + new ArgumentsBindingClassGen(t1Instance).namedArgumentsMethod(t1Instance, + t2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBindingClassGen(t1Instance).testSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + // Test superclass constructor call + Expect.throws(() { + new ArgumentsBindingDesc(t0Instance); + }, (e) => e is TypeError); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t02.dart new file mode 100644 index 0000000000..a98c4894f2 --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t02.dart @@ -0,0 +1,315 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 not a subtype of a type T1, then it cannot +/// be used as an argument of type T1. Test superclass members +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/arguments_binding_fail_x02.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; +import '../../../../Utils/expect.dart'; + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +class ArgumentsBindingSuper1_t02 { + F1 m; + + ArgumentsBindingSuper1_t02(F1 value): m = value {} + ArgumentsBindingSuper1_t02.named(F1 value, {F1 val2 = t1Default}): m = value {} + ArgumentsBindingSuper1_t02.positional(F1 value, [F1 val2 = t1Default]): m = value {} + ArgumentsBindingSuper1_t02.short(this.m); + + void superTest(F1 val) {} + void superTestPositioned(F1 val, [F1 val2 = t1Default]) {} + void superTestNamed(F1 val, {F1 val2 = t1Default}) {} + F1 get superGetter => forgetType(t0Instance); + void set superSetter(F1 val) {} +} + +class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 { + ArgumentsBinding1_t02(dynamic t1) : super(t1) {} + ArgumentsBinding1_t02.c1(dynamic t1) : super.named(t1) {} + ArgumentsBinding1_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {} + ArgumentsBinding1_t02.c3(dynamic t1) : super.positional(t1) {} + ArgumentsBinding1_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {} + ArgumentsBinding1_t02.c5(dynamic t1) : super.short(t1) {} + + test() { + Expect.throws(() { + superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superTestPositioned(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTestPositioned(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTestPositioned(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superTestPositioned(forgetType(t1Instance), forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superTestNamed(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTestNamed(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTestNamed(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + superGetter; + }, (e) => e is TypeError); + + Expect.throws(() { + this.superGetter; + }, (e) => e is TypeError); + + Expect.throws(() { + super.superGetter; + }, (e) => e is TypeError); + } +} + +class ArgumentsBindingSuper2_t02 { + X m; + + ArgumentsBindingSuper2_t02(X value): m = value {} + ArgumentsBindingSuper2_t02.named(X value, {required X val2}): m = value {} + ArgumentsBindingSuper2_t02.short(this.m); + + void superTest(X val) {} + void superTestNamed(X val, {required X val2}) {} + X get superGetter => forgetType(t0Instance); + void set superSetter(X val) {} +} + +class ArgumentsBinding2_t02 extends ArgumentsBindingSuper2_t02 { + ArgumentsBinding2_t02(dynamic t1) : super(t1) {} + ArgumentsBinding2_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {} + ArgumentsBinding2_t02.c5(dynamic t1) : super.short(t1) {} + + test() { + Expect.throws(() { + superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + superGetter; + }, (e) => e is TypeError); + + Expect.throws(() { + this.superGetter; + }, (e) => e is TypeError); + + Expect.throws(() { + super.superGetter; + }, (e) => e is TypeError); + } +} + +main() { + // test constructors + Expect.throws(() { + new ArgumentsBinding1_t02(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t02.c1(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t02.c2(t1Instance, forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t02.c3(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t02.c4(t1Instance, forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t02.c5(forgetType(t0Instance)); + }, (e) => e is TypeError); + + // test class members + Expect.throws(() { + new ArgumentsBinding1_t02(t1Instance).superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t02(t1Instance).superTestPositioned(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t02(t1Instance).superTestPositioned(t1Instance, forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t02(t1Instance).superTestNamed(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t02(t1Instance).superTestNamed(t1Instance, val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t02(t1Instance).superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t02(t1Instance).superGetter; + }, (e) => e is TypeError); + + new ArgumentsBinding1_t02(t1Instance).test(); + + // Test type parameters + + // test generic class constructors + Expect.throws(() { + new ArgumentsBinding2_t02(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding2_t02.c2(t1Instance, forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding2_t02.c5(forgetType(t0Instance)); + }, (e) => e is TypeError); + + // test generic class members + Expect.throws(() { + new ArgumentsBinding2_t02(t1Instance).superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding2_t02(t1Instance).superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding2_t02(t1Instance).superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding2_t02(t1Instance).superGetter; + }, (e) => e is TypeError); + + new ArgumentsBinding2_t02(t1Instance).test(); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t03.dart new file mode 100644 index 0000000000..20dfb1c57f --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t03.dart @@ -0,0 +1,278 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 not a subtype of a type T1, then it cannot +/// be used as an argument of type T1. Test mixin members +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/arguments_binding_fail_x03.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; +import '../../../../Utils/expect.dart'; + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +mixin class ArgumentsBindingSuper1_t03 { + void superTest(F1 val) {} + void superTestPositioned(F1 val, [F1 val2 = t1Default]) {} + void superTestNamed(F1 val, {F1 val2 = t1Default}) {} + F1 get superGetter => forgetType(t0Instance); + void set superSetter(F1 val) {} +} + +class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 { + test() { + Expect.throws(() { + superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superTestPositioned(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTestPositioned(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTestPositioned(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superTestPositioned(forgetType(t1Instance), forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTestPositioned(forgetType(t1Instance), forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superTestNamed(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTestNamed(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTestNamed(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + superGetter; + }, (e) => e is TypeError); + + Expect.throws(() { + this.superGetter; + }, (e) => e is TypeError); + + Expect.throws(() { + super.superGetter; + }, (e) => e is TypeError); + } +} + +mixin class ArgumentsBindingSuper2_t03 { + void superTest(X val) {} + void superTestNamed(X val, {required X val2}) {} + X get superGetter => forgetType(t0Instance); + void set superSetter(X val) {} +} + +class ArgumentsBinding2_t03 extends Object with ArgumentsBindingSuper2_t03 { + + test() { + Expect.throws(() { + superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superTestNamed(forgetType(t0Instance), val2: forgetType(t1Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTestNamed(forgetType(t0Instance), val2: forgetType(t1Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTestNamed(forgetType(t0Instance), val2: forgetType(t1Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + this.superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + super.superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + superGetter; + }, (e) => e is TypeError); + + Expect.throws(() { + this.superGetter; + }, (e) => e is TypeError); + + Expect.throws(() { + super.superGetter; + }, (e) => e is TypeError); + } +} + +main() { + // test class members + Expect.throws(() { + new ArgumentsBinding1_t03().superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t03().superTestPositioned(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t03().superTestPositioned(t1Instance, forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t03().superTestNamed(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t03().superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding1_t03().superGetter; + }, (e) => e is TypeError); + + new ArgumentsBinding1_t03().test(); + + // Test type parameters + + // test generic class members + Expect.throws(() { + new ArgumentsBinding2_t03().superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding2_t03().superTest(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding2_t03().superTestNamed(forgetType(t0Instance), val2: forgetType(t1Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding2_t03().superTestNamed(forgetType(t1Instance), val2: forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding2_t03().superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + new ArgumentsBinding2_t03().superGetter; + }, (e) => e is TypeError); + + new ArgumentsBinding2_t03().test(); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t01.dart index 8de70deef1..519e55ad4b 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t02.dart index c74403ad3a..5487987a26 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t03.dart index 306ee6442a..7c5ce98b42 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A11_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t01.dart index 2cdb6acd06..65fc5d5b37 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t02.dart index 507c0128ac..2941a53a38 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t03.dart index 49c052e4c1..50680f7dd8 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A12_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t01.dart index 3391c02c6b..f281108d0d 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t02.dart index c1ae327574..e8e635f82e 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t03.dart index 350ba459ca..937d828351 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A21_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t01.dart index 7a1b696988..dcfacd1d76 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t02.dart index 6fc77fc931..a580260cda 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t03.dart index f47c638fa0..5c23cb3304 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A22_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t01.dart index 55b1b117b9..387569ae28 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t02.dart index 156a45a23e..6f623cd78f 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t03.dart index dd88e7fe45..bec0a6ae9e 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A23_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t01.dart index d01036a62f..c58e9737e9 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t02.dart index 5da00358af..79e73d73f7 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t03.dart index dbac4524c8..892bc7a360 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A31_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t01.dart index 44f812cf94..18692f185a 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t02.dart index 85f0d10dfb..feaebf4932 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t03.dart index 4eb8b3232c..81c34c6cf9 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A32_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t01.dart index bf6d4f4aa8..a1917d00eb 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t02.dart index eb40241a90..13d152f514 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t03.dart index c654c9c2c9..47cf850e1d 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A33_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t01.dart index 727b27f191..b3bc32f419 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t02.dart index 871800e9cf..83264613bd 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t03.dart index afdac1d061..4ea33a0eb6 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A41_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t01.dart index 232ed1abec..be621d2f74 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t02.dart index 3cf1ba98db..5f543b578e 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t03.dart index 30824c2b06..0e806222fa 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A42_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t01.dart index 615b8d694b..9182fe44fd 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t02.dart index fc5bb0e812..a04fdb1dd8 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t03.dart index d2900b69de..0dd91bb4ee 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A43_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01.dart index 2fc0862f3a..aa9cbb53b8 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02.dart index 16a347e681..34327a6efd 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t03.dart index 0fbf1e2da2..7ff71c97a8 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A51_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t01.dart index c3c9fed552..c17c0bba96 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t02.dart index e287c777ec..5c1cbb738c 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t03.dart index ff532323ef..9b3d504dc1 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A52_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01.dart index 90ab02ee46..ebccc9d980 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t02.dart index 3c64e21dd6..783af19a8a 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t03.dart index 338e2b3139..6d6bc6a71b 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A53_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t01.dart new file mode 100644 index 0000000000..f7be1945b2 --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t01.dart @@ -0,0 +1,264 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 not a subtype of a type T1, then it cannot +/// be used as a class member of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/class_member_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; +import '../../../../Utils/expect.dart'; + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +class ClassMemberTestStatic { + static F1 s = t1Default; + + ClassMemberTestStatic(dynamic val) { + s = val; + } + + static staticTest() { + s = forgetType(t0Instance); + } + + static set staticSetter(dynamic val) { + s = val; + } + + static F1 get staticGetter => forgetType(t0Instance); +} + +class ClassMemberTestPublic { + F1 m = t1Default; + + ClassMemberTestPublic(dynamic val) { + m = val; + } + + ClassMemberTestPublic.short(this.m); + + ClassMemberTestPublic.validConstructor() {} + + test(dynamic val) { + m = val; + } + + set setter(dynamic val) { + m = val; + } + + F1 get getter => forgetType(t0Instance); +} + +class ClassMemberTestPrivate { + F1 _m = t1Default; + + ClassMemberTestPrivate(dynamic val) { + _m = val; + } + + ClassMemberTestPrivate.short(this._m); + + ClassMemberTestPrivate.validConstructor() {} + + test(dynamic val) { + _m = val; + } + + set setter(dynamic val) { + _m = val; + } +} + +class ClassMemberTestInitFail { + static F1 s = forgetType(t0Instance); + F1 m = forgetType(t0Instance); +} + +class ClassMemberTestGenericPublic { + X m; + + ClassMemberTestGenericPublic(dynamic val): m = val { + } + + ClassMemberTestGenericPublic.short(this.m); + + test(dynamic val) { + m = val; + } + + set setter(dynamic val) { + m = val; + } + + X get getter => forgetType(t0Instance); +} + +class ClassMemberTestGenericPrivate { + X _m; + + ClassMemberTestGenericPrivate(dynamic val): _m = val { + } + + ClassMemberTestGenericPrivate.short(this._m); + + test(dynamic val) { + _m = val; + } + + set setter(dynamic val) { + _m = val; + } +} + +main() { + // Test initialization + Expect.throws(() {ClassMemberTestInitFail.s;}, (e) => e is TypeError); + Expect.throws(() {new ClassMemberTestInitFail();}, (e) => e is TypeError); + + // Test constructors + Expect.throws(() { + new ClassMemberTestPublic(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + new ClassMemberTestPublic.short(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ClassMemberTestPrivate(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + new ClassMemberTestPrivate.short(forgetType(t0Instance)); + }, (e) => e is TypeError); + + // Test class variables + Expect.throws(() { + new ClassMemberTestPublic(t1Instance).m = forgetType(t0Instance); + }, (e) => e is TypeError); + + // Test setters + Expect.throws(() { + new ClassMemberTestPublic(t1Instance).setter = t0Instance; + }, (e) => e is TypeError); + + Expect.throws(() { + new ClassMemberTestPrivate(t1Instance).setter = t0Instance; + }, (e) => e is TypeError); + + // Test methods + Expect.throws(() { + new ClassMemberTestPublic(t1Instance).test(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + new ClassMemberTestPrivate(t1Instance).test(t0Instance); + }, (e) => e is TypeError); + + // Test getters + Expect.throws(() { + new ClassMemberTestPublic(t1Instance).getter; + }, (e) => e is TypeError); + + // Test static stuff + Expect.throws(() { + new ClassMemberTestStatic(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + ClassMemberTestStatic.staticSetter = t0Instance; + }, (e) => e is TypeError); + + Expect.throws(() { + ClassMemberTestStatic.staticGetter; + }, (e) => e is TypeError); + + Expect.throws(() { + ClassMemberTestStatic.staticTest(); + }, (e) => e is TypeError); + + // Test type parameters + + // Test getters + Expect.throws(() { + new ClassMemberTestGenericPublic(t1Instance).getter; + }, (e) => e is TypeError); + + // Test methods + Expect.throws(() { + new ClassMemberTestGenericPublic(t1Instance).test(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + new ClassMemberTestGenericPrivate(t1Instance).test(t0Instance); + }, (e) => e is TypeError); + + // Test setters + Expect.throws(() { + new ClassMemberTestGenericPublic(t1Instance).setter = t0Instance; + }, (e) => e is TypeError); + + Expect.throws(() { + new ClassMemberTestGenericPrivate(t1Instance).setter = t0Instance; + }, (e) => e is TypeError); + + // Test class variables + Expect.throws(() { + new ClassMemberTestGenericPublic(t1Instance).m = forgetType(t0Instance); + }, (e) => e is TypeError); + + // Test constructors + Expect.throws(() { + new ClassMemberTestGenericPublic(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + new ClassMemberTestGenericPublic.short(forgetType(t0Instance)); + }, (e) => e is TypeError); + + Expect.throws(() { + new ClassMemberTestGenericPrivate(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + new ClassMemberTestGenericPrivate.short(forgetType(t0Instance)); + }, (e) => e is TypeError); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t02.dart new file mode 100644 index 0000000000..616702ce10 --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t02.dart @@ -0,0 +1,161 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is not a subtype of a type T1, then +/// instance of T0 cannot be assigned to the superclass member of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/class_member_fail_x02.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; +import '../../../../Utils/expect.dart'; + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; + +const t1Default = f1Instance; + +class ClassMemberSuper1_t02 { + F1 m = t1Default; + + ClassMemberSuper1_t02(dynamic value) { + m = value; + } + + ClassMemberSuper1_t02.named(dynamic value) { + m = value; + } + + ClassMemberSuper1_t02.short(this.m); + + void set superSetter(F1 val) {} +} + +class ClassMember1_t02 extends ClassMemberSuper1_t02 { + + ClassMember1_t02() : super(forgetType(t0Instance)) {} + + ClassMember1_t02.named() : super.named(forgetType(t0Instance)) {} + + ClassMember1_t02.short() : super.short(forgetType(t0Instance)); + + ClassMember1_t02.valid() : super(null); + + test1() { + m = forgetType(t0Instance); + } + + test2() { + superSetter = forgetType(t0Instance); + } +} + +class ClassMemberSuper2_t02 { + X m; + + ClassMemberSuper2_t02(X value): m = value { + } + + ClassMemberSuper2_t02.named(X value): m = value { + } + + ClassMemberSuper2_t02.short(this.m); + + void set superSetter(X val) {} +} + +class ClassMember2_t02 extends ClassMemberSuper2_t02 { + + ClassMember2_t02() : super(forgetType(t0Instance)) {} + + ClassMember2_t02.named() : super.named(forgetType(t0Instance)) {} + + ClassMember2_t02.short() : super.short(forgetType(t0Instance)); + + test1() { + m = forgetType(t0Instance); + } + + test2() { + superSetter = forgetType(t0Instance); + } +} + +main() { + Expect.throws(() { + new ClassMember1_t02(); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember1_t02.short(); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember1_t02.named(); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember1_t02().m = forgetType(t0Instance); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember1_t02().superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember1_t02().test1(); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember1_t02().test2(); + }, (e) => e is TypeError); + + // Test type parameters + + Expect.throws(() { + new ClassMember2_t02(); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember2_t02.short(); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember2_t02.named(); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember2_t02().m = forgetType(t0Instance); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember2_t02().superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember2_t02().test1(); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember2_t02().test2(); + }, (e) => e is TypeError); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t03.dart new file mode 100644 index 0000000000..2e7676783e --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t03.dart @@ -0,0 +1,116 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is not a subtype of a type T1, then +/// instance of T0 cannot be assigned to the mixin member of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/class_member_fail_x03.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; +import '../../../../Utils/expect.dart'; + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +mixin class ClassMemberSuper1_t03 { + F1 m = t1Default; + + void set superSetter(F1 val) {} +} + +class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 { + + test1() { + m = forgetType(t0Instance); + } + + test2() { + superSetter = forgetType(t0Instance); + } +} + +class ClassMemberSuper2_t03 { + X m; + + ClassMemberSuper2_t03(X x) : m = x {} + + void set superSetter(X val) {} +} + +class ClassMember2_t03 extends ClassMemberSuper2_t03 { + + ClassMember2_t03(X x): super(x) {} + + test1() { + m = forgetType(t0Instance); + } + + test2() { + superSetter = forgetType(t0Instance); + } +} + +main() { + Expect.throws(() { + new ClassMember1_t03().m = forgetType(t0Instance); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember1_t03().superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember1_t03().test1(); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember1_t03().test2(); + }, (e) => e is TypeError); + + // Test type parameters + + Expect.throws(() { + new ClassMember2_t03(t1Instance).m = forgetType(t0Instance); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember2_t03(t1Instance).superSetter = forgetType(t0Instance); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember2_t03(t1Instance).test1(); + }, (e) => e is TypeError); + Expect.throws(() { + new ClassMember2_t03(t1Instance).test2(); + }, (e) => e is TypeError); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t01.dart index 3c702d8cd2..008111b49e 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t02.dart index 7b5f452e2b..2071f5bb53 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t03.dart index 39dc13dcc6..629e5cb72e 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A11_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t01.dart index 465a0f0d71..47ceb74930 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t02.dart index 349c2b28db..b21f0296d9 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t03.dart index 843a3648f6..0ece93adde 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A12_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t01.dart index 78a1f55704..4f5187fdc9 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t02.dart index 5bb6f76d01..a15fe2b913 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t03.dart index 8cd17153d2..89a49c0f3d 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A21_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t01.dart index e049844d75..061eea2cf3 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t02.dart index 45be2f0a97..d5f39c7e97 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t03.dart index 6bd1be193a..5346702fc4 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A22_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t01.dart index 0cbb1e6049..52328d56d3 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t02.dart index b74015ff54..c5e4023033 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t03.dart index 29f037333e..89114e27ad 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A23_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t01.dart index 2b583100c0..06ba8cce47 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t02.dart index 13747763d0..581b9a58d3 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t03.dart index 431c34f1ef..6afc2d917e 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A31_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t01.dart index 9643ea3024..2cabfd2d5a 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t02.dart index 8bd98649dd..60f19cc76c 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t03.dart index cc9b6b136b..b9d2764e5e 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A32_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t01.dart index 9859283134..247a30e127 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t02.dart index 3a5b6af66b..198cb53063 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t03.dart index 5630ec285c..3310caec6d 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A33_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t01.dart index 02f4ae8738..edd7377a5f 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t02.dart index 4e728a4176..715cbd4b96 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t03.dart index a9dc92a779..d081bf7584 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A41_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t01.dart index f1effd4c18..9c29be28d0 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t02.dart index 1cc49a90fc..76ca17e6bd 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t03.dart index ae768a3f9d..d0dde71f1c 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A42_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t01.dart index ec9380946c..299eebab94 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t02.dart index 4ef622151f..2ec39b4a4e 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t03.dart index 5eae49bcf1..1a56b98cdb 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A43_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t01.dart index 44bc47770d..8ef71d9bc0 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02.dart index 7405bd98b9..05345f46ff 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03.dart index 73d458912e..97b2fe5115 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A51_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t01.dart index 162273dbda..d514e0d157 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t02.dart index 5cee30f0fe..f028b7b194 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t03.dart index 5f18c67f77..fd683bdddc 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A52_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01.dart index 8383012b8e..526420868d 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02.dart index f3bdcda55e..52ee655412 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03.dart index 5ce4638298..301c4eaa6a 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A53_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A06_t01.dart new file mode 100644 index 0000000000..903df4f8bb --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A06_t01.dart @@ -0,0 +1,88 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is not a subtype of a type T1, then +/// instance of T0 cannot be assigned to the to global variable of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/global_variable_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; +import '../../../../Utils/expect.dart'; + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +class GlobalVariableTest { + GlobalVariableTest() { + t1Instance = forgetType(t0Instance); + } + + GlobalVariableTest.valid() {} + + foo() { + t1Instance = forgetType(t0Instance); + } + + static test() { + t1Instance = forgetType(t0Instance); + } +} + +main() { + bar () { + t1Instance = forgetType(t0Instance); + } + + Expect.throws(() { + t1Instance = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + bar(); + }, (e) => e is TypeError); + + Expect.throws(() { + new GlobalVariableTest(); + }, (e) => e is TypeError); + + Expect.throws(() { + new GlobalVariableTest.valid().foo(); + }, (e) => e is TypeError); + + Expect.throws(() { + GlobalVariableTest.test(); + }, (e) => e is TypeError); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A11_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A11_t01.dart index ef96bd5c85..f3e52d6796 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A12_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A12_t01.dart index ff0f24173a..af6340463f 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A21_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A21_t01.dart index 602458871a..bf5288491b 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A22_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A22_t01.dart index 3d6662dcfa..0af37e6f11 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A23_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A23_t01.dart index 7a9f389758..883a09e649 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A31_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A31_t01.dart index b0bd142f29..c14ca00d32 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A32_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A32_t01.dart index fe34d4a060..1a7846705a 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A33_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A33_t01.dart index b4a5253efe..6319239fe1 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A41_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A41_t01.dart index ceebe70120..842987abf2 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A42_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A42_t01.dart index fedfc9e191..bef07afe7c 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A43_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A43_t01.dart index fb321d5dfb..0de10802a0 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01.dart index 6d514ec9a6..ea45eb7855 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01.dart index 6be75bb512..853f3ab281 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A53_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A53_t01.dart index 4d2dceb54f..01f98157f8 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A06_t01.dart new file mode 100644 index 0000000000..3d08a8f1cc --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A06_t01.dart @@ -0,0 +1,88 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is not a subtype of a type T1, then +/// instance of T0 cannot be assigned to the to local variable of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/local_variable_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; +import '../../../../Utils/expect.dart'; + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; + +class LocalVariableTest { + + LocalVariableTest() { + F1 t1 = forgetType(t0Instance); + } + + LocalVariableTest.valid() {} + + static staticTest() { + F1 t1 = forgetType(t0Instance); + } + + test() { + F1 t1 = forgetType(t0Instance); + } +} + +main() { + bar () { + F1 t1 = forgetType(t0Instance); + } + + Expect.throws(() { + F1 t1 = forgetType(t0Instance); + }, (e) => e is TypeError); + + Expect.throws(() { + bar(); + }, (e) => e is TypeError); + + Expect.throws(() { + new LocalVariableTest(); + }, (e) => e is TypeError); + + Expect.throws(() { + new LocalVariableTest.valid().test(); + }, (e) => e is TypeError); + + Expect.throws(() { + LocalVariableTest.staticTest(); + }, (e) => e is TypeError); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A11_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A11_t01.dart index 4db93c93d7..5e41b8c7fc 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A12_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A12_t01.dart index da34cbbbfc..6e005909d1 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A21_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A21_t01.dart index b8f54a19cb..f85d84c3af 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A22_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A22_t01.dart index 24d7d614d0..bac053008b 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A23_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A23_t01.dart index 36e8a91f3b..5c1447e211 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A31_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A31_t01.dart index 4bdae3c6cc..917691b9c9 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A32_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A32_t01.dart index 574fa3235f..1072ce4a22 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A33_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A33_t01.dart index 8bcf21f158..2ea18ead2b 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A41_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A41_t01.dart index 3416a86542..966437d6b8 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A42_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A42_t01.dart index 04fdae5c9b..3fcd271136 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A43_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A43_t01.dart index 84da36f8f0..699f419dd5 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01.dart index 2fa59bad50..a6b8017cbe 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01.dart index b324d69019..7c4ca956cd 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01.dart index ef489af662..9d276983c9 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A06_t01.dart new file mode 100644 index 0000000000..caef31303e --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A06_t01.dart @@ -0,0 +1,90 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 not a subtype of a type T1, then instance +/// of T0 cannot be used as a return value of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/return_value_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; +import '../../../../Utils/expect.dart'; + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; + +F1 returnValueFunc() => forgetType(t0Instance); + +class ReturnValueTest { + static F1 staticTestMethod() => forgetType(t0Instance); + + F1 testMethod() => forgetType(t0Instance); + + F1 get testGetter => forgetType(t0Instance); +} + +class ReturnValueGen { + X testMethod() => forgetType(t0Instance); + X get testGetter => forgetType(t0Instance); +} + +main() { + F1 returnValueLocalFunc() => forgetType(t0Instance); + + Expect.throws(() { + returnValueFunc(); + }, (e) => e is TypeError); + Expect.throws(() { + returnValueLocalFunc(); + }, (e) => e is TypeError); + Expect.throws(() { + ReturnValueTest.staticTestMethod(); + }, (e) => e is TypeError); + + Expect.throws(() { + new ReturnValueTest().testMethod(); + }, (e) => e is TypeError); + Expect.throws(() { + new ReturnValueTest().testGetter; + }, (e) => e is TypeError); + + // Test type parameters + + Expect.throws(() { + new ReturnValueGen().testMethod(); + }, (e) => e is TypeError); + Expect.throws(() { + new ReturnValueGen().testGetter; + }, (e) => e is TypeError); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A11_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A11_t01.dart index 4193865002..7e924abacd 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A12_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A12_t01.dart index b196f7aca1..492bed67ea 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A21_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A21_t01.dart index 8f4494d9b2..07958646dd 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A22_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A22_t01.dart index c5b1259320..07bdd1409a 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A23_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A23_t01.dart index 58e3dd64c1..3a86cc7ff3 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A31_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A31_t01.dart index 90b50aa2a9..1ff137658f 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A32_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A32_t01.dart index 8787750397..43a5b2a7d2 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A33_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A33_t01.dart index fbadcc932f..8ff5ae2b0b 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A41_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A41_t01.dart index 3593fee07e..cd4780a97c 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A42_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A42_t01.dart index b52db1a6a9..10b37d0f1a 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A43_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A43_t01.dart index 08bb712321..843c657276 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A51_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A51_t01.dart index dd3adbed9a..0f98f3b1bc 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A52_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A52_t01.dart index 337f632080..3f7359457d 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01.dart index ffb227ab53..7e20ed9471 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A01_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A01_t01.dart index 511768c580..c2349c74f2 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A01_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A01_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A02_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A02_t01.dart index 74452d9cec..7b77191f8c 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A02_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A02_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A03_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A03_t01.dart index 8cc9e6f424..aaa5926dfc 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A03_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A03_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A04_t01.dart index 92bf7efe7a..48f1caffcf 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A04_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A04_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A05_t01.dart index 0e6d6d7e49..8d7d7f27bb 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A05_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A05_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A06_t01.dart new file mode 100644 index 0000000000..67b37fba95 --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_global_variable_A06_t01.dart @@ -0,0 +1,70 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be assigned to the to global variable of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/global_variable_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +class GlobalVariableTest { + GlobalVariableTest() { + t1Instance = forgetType(t0Instance); + } + + foo() { + t1Instance = forgetType(t0Instance); + } + + static test() { + t1Instance = forgetType(t0Instance); + } +} + +main() { + bar () { + t1Instance = forgetType(t0Instance); + } + + t1Instance = forgetType(t0Instance); + bar(); + GlobalVariableTest t = new GlobalVariableTest(); + t.foo(); + GlobalVariableTest.test(); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A01_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A01_t01.dart index c60f63ac56..bbd0ee9706 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A01_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A01_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A02_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A02_t01.dart index 3e8cabb1be..44134c1420 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A02_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A02_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A03_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A03_t01.dart index 9807041c12..196036acd1 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A03_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A03_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A04_t01.dart index a6739578fb..3f613253ae 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A04_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A04_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A05_t01.dart index 59f3d8a3ca..9da2e00c9e 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A05_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A05_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A06_t01.dart new file mode 100644 index 0000000000..f6db1ceb27 --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_local_variable_A06_t01.dart @@ -0,0 +1,75 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be assigned to the to local variable of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/local_variable_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; + +class LocalVariableTest { + + LocalVariableTest() { + F1 t1 = forgetType(t0Instance); + t1 = forgetType(t0Instance); + } + + static staticTest() { + F1 t1 = forgetType(t0Instance); + t1 = forgetType(t0Instance); + } + + test() { + F1 t1 = forgetType(t0Instance); + t1 = forgetType(t0Instance); + } +} + +main() { + foo() { + F1 t1 = forgetType(t0Instance); + t1 = forgetType(t0Instance); + } + + F1 t1 = forgetType(t0Instance); + t1 = forgetType(t0Instance); + foo(); + LocalVariableTest x = new LocalVariableTest(); + x.test(); + LocalVariableTest.staticTest(); +} diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A01_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A01_t01.dart index bf6858316a..ebfe4760e9 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A01_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A01_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A02_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A02_t01.dart index d448ff2d3c..eb7fb075b0 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A02_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A02_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A03_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A03_t01.dart index 2651c04ad7..232bf84eca 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A03_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A03_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A04_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A04_t01.dart index 71e948abe0..de3148d791 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A04_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A04_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A05_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A05_t01.dart index 64cca177d3..5cc0849138 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A05_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A05_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A06_t01.dart new file mode 100644 index 0000000000..f2c515a916 --- /dev/null +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_return_value_A06_t01.dart @@ -0,0 +1,75 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be used as a return value of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/return_value_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +import '../../utils/common.dart'; + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; + +F1 returnValueFunc() => forgetType(t0Instance); + +class ReturnValueTest { + static F1 staticTestMethod() => forgetType(t0Instance); + + F1 testMethod() => forgetType(t0Instance); + + F1 get testGetter => forgetType(t0Instance); +} + +class ReturnValueGen { + X testMethod() => forgetType(t0Instance); + X get testGetter => forgetType(t0Instance); +} + +main() { + F1 returnValueLocalFunc() => forgetType(t0Instance); + + returnValueFunc(); + returnValueLocalFunc(); + + ReturnValueTest.staticTestMethod(); + + new ReturnValueTest().testMethod(); + new ReturnValueTest().testGetter; + + // Test type parameters + + new ReturnValueGen().testMethod(); + new ReturnValueGen().testGetter; +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t01.dart index b56e7270fd..7065770930 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t02.dart index 40f115a059..5ff2260c36 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t02.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t03.dart index 8eb45cd2f6..45f02be096 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t03.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A01_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t01.dart index ff8c6447f5..38497af5ff 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t02.dart index f03f0144a5..81183969e5 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t02.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t03.dart index 7aa1026d66..5064561798 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t03.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A02_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t01.dart index 6b31e1ccf4..475ddbe068 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t02.dart index 39b0735c54..98ed959174 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t02.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t03.dart index 7a46612513..70641396e8 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t03.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A03_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t01.dart index 2955598ce0..f4fd658551 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t02.dart index 5ae9adbded..f47b6a5e25 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t02.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t03.dart index 4cb950eb3b..ff52728e7b 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t03.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A04_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t01.dart index c84027e4ac..52631f34b9 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t02.dart index 7644e14d60..be5dcd1942 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t02.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t03.dart index d3a2410e54..1fff1cf733 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t03.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A05_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t01.dart new file mode 100644 index 0000000000..b7db7aae46 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t01.dart @@ -0,0 +1,120 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be used as an argument of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/arguments_binding_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; + +const t1Default = f1Instance; + +namedArgumentsFunc1(F1 t1, {F1 t2 = t1Default}) {} +positionalArgumentsFunc1(F1 t1, [F1 t2 = t1Default]) {} + +namedArgumentsFunc2(X t1, {required X t2}) {} + +class ArgumentsBindingClass { + ArgumentsBindingClass(F1 t1) {} + + ArgumentsBindingClass.named(F1 t1, {F1 t2 = t1Default}) {} + ArgumentsBindingClass.positional(F1 t1, [F1 t2 = t1Default]) {} + + factory ArgumentsBindingClass.fNamed(F1 t1, {F1 t2 = t1Default}) { + return new ArgumentsBindingClass.named(t1, t2: t2); + } + factory ArgumentsBindingClass.fPositional(F1 t1, [F1 t2 = t1Default]) { + return new ArgumentsBindingClass.positional(t1, t2); + } + + static namedArgumentsStaticMethod(F1 t1, {F1 t2 = t1Default}) {} + static positionalArgumentsStaticMethod(F1 t1, [F1 t2 = t1Default]) {} + + namedArgumentsMethod(F1 t1, {F1 t2 = t1Default}) {} + positionalArgumentsMethod(F1 t1, [F1 t2 = t1Default]) {} + + set testSetter(F1 val) {} +} + +class ArgumentsBindingGen { + ArgumentsBindingGen(X t1) {} + + ArgumentsBindingGen.named(X t1, {required X t2}) {} + + factory ArgumentsBindingGen.fNamed(X t1, {required X t2}) { + return new ArgumentsBindingGen.named(t1, t2: t2); + } + + namedArgumentsMethod(X t1, {required X t2}) {} + + set testSetter(X val) {} +} + +main() { + // test functions + namedArgumentsFunc1(t0Instance, t2: t0Instance); + positionalArgumentsFunc1(t0Instance, t0Instance); + + // test class constructors + ArgumentsBindingClass instance1 = new ArgumentsBindingClass(t0Instance); + instance1 = new ArgumentsBindingClass.fNamed(t0Instance, t2: t0Instance); + instance1 = new ArgumentsBindingClass.fPositional(t0Instance, t0Instance); + instance1 = new ArgumentsBindingClass.named(t0Instance, t2: t0Instance); + instance1 = new ArgumentsBindingClass.positional(t0Instance, t0Instance); + + // tests methods and setters + instance1.namedArgumentsMethod(t0Instance, t2: t0Instance); + instance1.positionalArgumentsMethod(t0Instance, t0Instance); + instance1.testSetter = t0Instance; + + // test static methods + ArgumentsBindingClass.namedArgumentsStaticMethod(t0Instance, t2: t0Instance); + ArgumentsBindingClass.positionalArgumentsStaticMethod(t0Instance, t0Instance); + + // Test type parameters + + // test generic functions + namedArgumentsFunc2(t0Instance, t2: t0Instance); + + // test generic class constructors + ArgumentsBindingGen instance2 = new ArgumentsBindingGen(t0Instance); + instance2 = new ArgumentsBindingGen.fNamed(t0Instance, t2: t0Instance); + instance2 = new ArgumentsBindingGen.named(t0Instance, t2: t0Instance); + + // test generic class methods and setters + instance2.namedArgumentsMethod(t0Instance, t2: t0Instance); + instance2.testSetter = t0Instance; +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t02.dart new file mode 100644 index 0000000000..1e60dd8718 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t02.dart @@ -0,0 +1,136 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be used as an argument of type T1. Test superclass members +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/arguments_binding_x02.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +class ArgumentsBindingSuper1_t02 { + F1 m = t1Default; + + ArgumentsBindingSuper1_t02(F1 value): m = value {} + ArgumentsBindingSuper1_t02.named(F1 value, {F1 val2 = t1Default}): m = value {} + ArgumentsBindingSuper1_t02.positional(F1 value, [F1 val2 = t1Default]): m = value {} + ArgumentsBindingSuper1_t02.short(this.m); + + void superTest(F1 val) {} + void superTestPositioned(F1 val, [F1 val2 = t1Default]) {} + void superTestNamed(F1 val, {F1 val2 = t1Default}) {} + F1 get superGetter => m; + void set superSetter(F1 val) {} +} + +class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 { + ArgumentsBinding1_t02(dynamic t1) : super(t1) {} + ArgumentsBinding1_t02.c1(dynamic t1) : super.named(t1) {} + ArgumentsBinding1_t02.c2(dynamic t1, dynamic t2) : super.named(t1, val2: t2) {} + ArgumentsBinding1_t02.c3(dynamic t1) : super.positional(t1) {} + ArgumentsBinding1_t02.c4(dynamic t1, dynamic t2) : super.positional(t1, t2) {} + ArgumentsBinding1_t02.c5(dynamic t1) : super.short(t1) {} + + test(dynamic t1, dynamic t2) { + superTest(t1); + superTestPositioned(t1); + superTestPositioned(t2, t1); + superTestNamed(t1); + superTestNamed(t2, val2: t1); + superSetter = t1; + m = t1; + superGetter; + } +} + +class ArgumentsBindingSuper2_t02 { + X m; + + ArgumentsBindingSuper2_t02(X value): m = value {} + ArgumentsBindingSuper2_t02.named(X value, {required X val2}): m = value {} + ArgumentsBindingSuper2_t02.short(this.m); + + void superTest(X val) {} + void superTestNamed(X val, {required X val2}) {} + X get superGetter => m; + void set superSetter(X val) {} +} + +class ArgumentsBinding2_t02 extends ArgumentsBindingSuper2_t02 { + ArgumentsBinding2_t02(X t1) : super(t1) {} + ArgumentsBinding2_t02.c2(X t1, X t2) : super.named(t1, val2: t2) {} + ArgumentsBinding2_t02.c5(X t1) : super.short(t1) {} + + test(X t1, X t2) { + superTest(t1); + superTestNamed(t2, val2: t1); + superSetter = t1; + m = t1; + superGetter; + } +} + +main() { + ArgumentsBinding1_t02 c1 = new ArgumentsBinding1_t02(t0Instance); + c1 = new ArgumentsBinding1_t02.c1(t0Instance); + c1 = new ArgumentsBinding1_t02.c2(t1Instance, t0Instance); + c1 = new ArgumentsBinding1_t02.c3(t0Instance); + c1 = new ArgumentsBinding1_t02.c4(t1Instance, t0Instance); + c1 = new ArgumentsBinding1_t02.c5(t0Instance); + + c1.test(t0Instance, t1Instance); + c1.superTest(t0Instance); + c1.superTestPositioned(t0Instance); + c1.superTestPositioned(t1Instance, t0Instance); + c1.superTestNamed(t0Instance); + c1.superTestNamed(t1Instance, val2: t0Instance); + c1.superSetter = t0Instance; + c1.superGetter; + + // Test type parameters + ArgumentsBinding2_t02 c2 = + new ArgumentsBinding2_t02(t0Instance); + c2 = new ArgumentsBinding2_t02.c2(t1Instance, t0Instance); + c2 = new ArgumentsBinding2_t02.c5(t0Instance); + + c2.test(t0Instance, t1Instance); + c2.superTest(t0Instance); + c2.superTestNamed(t1Instance, val2: t0Instance); + c2.superSetter = t0Instance; + c2.superGetter; +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t03.dart new file mode 100644 index 0000000000..87799d3486 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_arguments_binding_A06_t03.dart @@ -0,0 +1,103 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be used as an argument of type T1. Test mixin members +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/arguments_binding_x03.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +mixin ArgumentsBindingMixin1_t03 { + F1 m = t1Default; + + void superTest(F1 val) {} + void superTestPositioned(F1 val, [F1 val2 = t1Default]) {} + void superTestNamed(F1 val, {F1 val2 = t1Default}) {} + F1 get superGetter => m; + void set superSetter(F1 val) {} +} + +class ArgumentsBinding1_t03 extends Object with ArgumentsBindingMixin1_t03 { + + test(dynamic t1, dynamic t2) { + superTest(t1); + superTestPositioned(t1); + superTestPositioned(t2, t1); + superTestNamed(t1); + superTestNamed(t2, val2: t1); + superSetter = t1; + m = t1; + superGetter; + } +} + +mixin ArgumentsBindingMixin2_t03 { + void superTest(X val) {} + void superTestNamed(X val, {required X val2}) {} + void set superSetter(X val) {} +} + +class ArgumentsBinding2_t03 extends Object with ArgumentsBindingMixin2_t03 { + + test(dynamic t1, dynamic t2) { + superTest(t1); + superTestNamed(t2, val2: t1); + superSetter = t1; + } +} + +main() { + ArgumentsBinding1_t03 c1 = new ArgumentsBinding1_t03(); + + c1.test(t0Instance, t1Instance); + c1.superTest(t0Instance); + c1.superTestPositioned(t0Instance); + c1.superTestPositioned(t1Instance, t0Instance); + c1.superTestNamed(t0Instance); + c1.superTestNamed(t1Instance, val2: t0Instance); + c1.superSetter = t0Instance; + c1.superGetter; + + // Test type parameters + ArgumentsBinding2_t03 c2 = new ArgumentsBinding2_t03(); + c2.test(t0Instance, t1Instance); + c2.superTest(t0Instance); + c2.superTestNamed(t1Instance, val2: t0Instance); + c2.superSetter = t0Instance; +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t01.dart index 1c037012e4..5e4142c54c 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t02.dart index 3815e35821..d35b2e9846 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t02.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t03.dart index 9f6f0b520b..746fa3d0b2 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t03.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A01_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t01.dart index bde6f4cdb0..4bd559fe3c 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t02.dart index cd6ada82b0..cf51623282 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t02.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t03.dart index d4fa3ad286..9b6428ae5e 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t03.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A02_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t01.dart index 938aafb5f9..a8a077dbab 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t02.dart index 3d061b56bc..2624c4464d 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t02.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t03.dart index cc8c61ee4e..09d0cd2577 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t03.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A03_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t01.dart index 2450ad2055..90134693ea 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t02.dart index 20092b9cca..629a419d40 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t02.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t03.dart index 83d0500efa..31567d509a 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t03.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A04_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t01.dart index ce865c7875..cd1cd077df 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t02.dart index 168c020017..9e9f9790d1 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t02.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t03.dart index d49ce5607c..b864c8aab9 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t03.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A05_t03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t01.dart new file mode 100644 index 0000000000..c52d3669dc --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t01.dart @@ -0,0 +1,99 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be assigned to the class member of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/class_member_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; + +class ClassMember1_t01 { + static F1 s = t0Instance; + F1 m = t0Instance; + F1 _p = t0Instance; + + ClassMember1_t01() { + s = t0Instance; + m = t0Instance; + _p = t0Instance; + } + + ClassMember1_t01.named(F1 value) { + s = value; + m = value; + _p = value; + } + + ClassMember1_t01.short(this.m, this._p); + + test() { + s = t0Instance; + m = t0Instance; + _p = t0Instance; + } + + set setter(F1 val) { + _p = val; + } + + F1 get getter => _p; + + static staticTest() { + s = t0Instance; + } + + static set staticSetter(F1 val) { + s = val; + } + + static F1 get staticGetter => t0Instance; +} + +main() { + ClassMember1_t01 c1 = new ClassMember1_t01(); + c1 = new ClassMember1_t01.short(t0Instance, + t0Instance); + c1 = new ClassMember1_t01.named(t0Instance); + c1.m = t0Instance; + c1.test(); + c1.setter = t0Instance; + c1.getter; + + ClassMember1_t01.s = t0Instance; + ClassMember1_t01.staticTest(); + ClassMember1_t01.staticSetter = t0Instance; + ClassMember1_t01.staticGetter; +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t02.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t02.dart new file mode 100644 index 0000000000..a50bd06799 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t02.dart @@ -0,0 +1,82 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be assigned to the superclass member of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/class_member_x02.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; + +const t1Default = f1Instance; + +class ClassMemberSuper1_t02 { + F1 m = t1Default; + + ClassMemberSuper1_t02(dynamic value) { + m = value; + } + + ClassMemberSuper1_t02.named(dynamic value) { + m = value; + } + + ClassMemberSuper1_t02.short(this.m); + + void set superSetter(F1 val) {} +} + +class ClassMember1_t02 extends ClassMemberSuper1_t02 { + + ClassMember1_t02() : super(t0Instance) {} + + ClassMember1_t02.named() : super.named(t0Instance) {} + + ClassMember1_t02.short() : super.short(t0Instance); + + test() { + m = t0Instance; + superSetter = t0Instance; + } +} + +main() { + ClassMember1_t02 c1 = new ClassMember1_t02(); + c1 = new ClassMember1_t02.short(); + c1 = new ClassMember1_t02.named(); + c1.m = t0Instance; + c1.test(); + c1.superSetter = t0Instance; +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t03.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t03.dart new file mode 100644 index 0000000000..9371f61ddc --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_class_member_A06_t03.dart @@ -0,0 +1,63 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be assigned to the mixin member of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/class_member_x03.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; + +const t1Default = f1Instance; + +mixin class ClassMemberMixin1_t03 { + F1 m = t1Default; + + void set superSetter(dynamic val) {} +} + +class ClassMember1_t03 extends Object with ClassMemberMixin1_t03 { + test() { + m = t0Instance; + superSetter = t0Instance; + } +} + +main() { + ClassMember1_t03 c1 = new ClassMember1_t03(); + c1.m = t0Instance; + c1.test(); + c1.superSetter = t0Instance; +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart new file mode 100644 index 0000000000..6bb43c88e7 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart @@ -0,0 +1,173 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 not a subtype of a type T1, then it cannot +/// be used as an argument of type T1. Global function required argument is +/// tested. +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/arguments_binding_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +namedArgumentsFunc1(F1 t1, {F1 t2 = t1Default}) {} +positionalArgumentsFunc1(F1 t1, [F1 t2 = t1Default]) {} + +class ArgumentsBindingClass { + ArgumentsBindingClass(F1 t1) {} + + ArgumentsBindingClass.named(F1 t1, {F1 t2 = t1Default}) {} + ArgumentsBindingClass.positional(F1 t1, [F1 t2 = t1Default]) {} + + factory ArgumentsBindingClass.fNamed(F1 t1, {F1 t2 = t1Default}) { + return new ArgumentsBindingClass.named(t1, t2: t2); + } + factory ArgumentsBindingClass.fPositional(F1 t1, [F1 t2 = t1Default]) { + return new ArgumentsBindingClass.positional(t1, t2); + } + + static namedArgumentsStaticMethod(F1 t1, {F1 t2 = t1Default}) {} + static positionalArgumentsStaticMethod(F1 t1, [F1 t2 = t1Default]) {} + + namedArgumentsMethod(F1 t1, {F1 t2 = t1Default}) {} + positionalArgumentsMethod(F1 t1, [F1 t2 = t1Default]) {} + + set testSetter(F1 val) {} +} + +class ArgumentsBindingClassSuper { + ArgumentsBindingClassSuper(F1 t1) {} +} + +class ArgumentsBindingDesc extends ArgumentsBindingClassSuper { + ArgumentsBindingDesc(F0 t0) : super (t0) {} +// ^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + namedArgumentsFunc1(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + namedArgumentsFunc1(t1Instance, t2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + positionalArgumentsFunc1(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + positionalArgumentsFunc1(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass(t1Instance).namedArgumentsMethod(t1Instance, t2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass(t1Instance).positionalArgumentsMethod(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass(t1Instance).testSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + ArgumentsBindingClass.namedArgumentsStaticMethod(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + ArgumentsBindingClass.namedArgumentsStaticMethod(t1Instance, t2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + ArgumentsBindingClass.positionalArgumentsStaticMethod(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + ArgumentsBindingClass.positionalArgumentsStaticMethod(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass.named(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass.named(t1Instance, t2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass.positional(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass.positional(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass.fNamed(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass.fNamed(t1Instance, t2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass.fPositional(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBindingClass.fPositional(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A11_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A11_t01.dart index 1fe391d7d4..be12e7a4da 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A12_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A12_t01.dart index 42bb58d9de..ec00fdce63 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A21_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A21_t01.dart index ac44a81305..bc67834005 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A22_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A22_t01.dart index d789f85faf..7155683aa9 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A23_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A23_t01.dart index 500a565ed8..49be2cfaaa 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A31_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A31_t01.dart index 36bb0e8d5d..649a9cf3eb 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A32_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A32_t01.dart index 75c2f5c082..dee83d47d2 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A33_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A33_t01.dart index 2e69a9ba7f..bbc9100216 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A41_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A41_t01.dart index 834088f968..52db9eafb9 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A42_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A42_t01.dart index 48eeb5a23c..4a31a149be 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A43_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A43_t01.dart index 4e4fabfa5f..b29f15217e 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A51_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A51_t01.dart index 2a6a7484b3..f396c031d2 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A52_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A52_t01.dart index 0ca6d71670..9868b34fbe 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A53_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A53_t01.dart index 2d7e805d6e..daa24fe1a4 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A06_t01.dart new file mode 100644 index 0000000000..158dd6e484 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A06_t01.dart @@ -0,0 +1,181 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 not a subtype of a type T1, then it cannot +/// be used as an argument of type T1. Test mixin members. Super method required +/// argument is tested. +/// @author sgrekhov@unipro.ru +/// @author ngl@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/arguments_binding_mixin_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +mixin ArgumentsBindingSuper1_t03 { + void superTest(F1 val) {} + void superTestPositioned(F1 val, [F1 val2 = t1Default]) {} + void superTestNamed(F1 val, {F1 val2 = t1Default}) {} + F1 get superGetter => t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + void set superSetter(F1 val) {} +} + +class ArgumentsBinding1_t03 extends Object with ArgumentsBindingSuper1_t03 { + + test() { + superTest(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superTest(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superTest(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + superTestPositioned(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superTestPositioned(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superTestPositioned(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + superTestPositioned(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superTestPositioned(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superTestPositioned(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + superTestNamed(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superTestNamed(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superTestNamed(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + superTestNamed(t1Instance, val2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superTestNamed(t1Instance, val2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superTestNamed(t1Instance, val2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + new ArgumentsBinding1_t03().superTest(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t03().superTestPositioned(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t03().superTestPositioned(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t03().superTestNamed(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t03().superTestNamed(t1Instance, val2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t03().superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t03().test(); +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A11_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A11_t01.dart index 584f483a99..e001eeca68 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A12_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A12_t01.dart index 28d260b8df..2c2eaf24a8 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A21_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A21_t01.dart index e9e3c95f8f..74334bfa7b 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A22_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A22_t01.dart index ab551ce069..af4e966666 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A23_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A23_t01.dart index 9513ac561a..c094f97474 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A31_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A31_t01.dart index 2ba9b0b828..26f1670ca1 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A32_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A32_t01.dart index c63e585121..a3e1c78873 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A33_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A33_t01.dart index d4c398a50a..ab56936177 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A41_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A41_t01.dart index cd38776a98..1a41cc3de7 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A42_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A42_t01.dart index 683833a32f..86f2056e6f 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A43_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A43_t01.dart index ebb60c494f..1508ff1da4 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A51_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A51_t01.dart index fe5d3be685..919a0926b2 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A52_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A52_t01.dart index 21f3c738e4..486073334f 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A53_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A53_t01.dart index cb71642ec4..76462228f4 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A06_t01.dart new file mode 100644 index 0000000000..8a09b1dc97 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A06_t01.dart @@ -0,0 +1,214 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 not a subtype of a type T1, then it cannot +/// be used as an argument of type T1. Test superclass members. Super constructor +/// required argument is tested. +/// @author sgrekhov@unipro.ru +/// @author ngl@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/arguments_binding_super_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +class ArgumentsBindingSuper1_t02 { + F1 m = t1Default; + + ArgumentsBindingSuper1_t02(F1 value): m = value {} + ArgumentsBindingSuper1_t02.named(F1 value, {F1 val2 = t1Default}): m = value {} + ArgumentsBindingSuper1_t02.positional(F1 value, [F1 val2 = t1Default]): m = value {} + ArgumentsBindingSuper1_t02.short(this.m); + + void superTest(F1 val) {} + void superTestPositioned(F1 val, [F1 val2 = t1Default]) {} + void superTestNamed(F1 val, {F1 val2 = t1Default}) {} + F1 get superGetter => t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + void set superSetter(F1 val) {} +} + +class ArgumentsBinding1_t02 extends ArgumentsBindingSuper1_t02 { + ArgumentsBinding1_t02(F0 t0) : super(t0) {} +// ^^ +// [analyzer] unspecified +// [cfe] unspecified + ArgumentsBinding1_t02.c1(F0 t0) : super.named(t0) {} +// ^^ +// [analyzer] unspecified +// [cfe] unspecified + ArgumentsBinding1_t02.c2(F1 t1, F0 t2) : super.named(t1, val2: t2) {} +// ^^ +// [analyzer] unspecified +// [cfe] unspecified + ArgumentsBinding1_t02.c3(F0 t0) : super.positional(t0) {} +// ^^ +// [analyzer] unspecified +// [cfe] unspecified + ArgumentsBinding1_t02.c4(F1 t1, F0 t2) : super.positional(t1, t2) {} +// ^^ +// [analyzer] unspecified +// [cfe] unspecified + ArgumentsBinding1_t02.c5(F0 t1) : super.short(t1) {} +// ^^ +// [analyzer] unspecified +// [cfe] unspecified + + ArgumentsBinding1_t02.valid() : super(t1Default) {} + + test() { + superTest(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superTest(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superTest(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + superTestPositioned(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superTestPositioned(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superTestPositioned(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + superTestPositioned(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superTestPositioned(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superTestPositioned(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + superTestNamed(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superTestNamed(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superTestNamed(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + superTestNamed(t1Instance, val2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superTestNamed(t1Instance, val2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superTestNamed(t1Instance, val2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + this.superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + super.superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + new ArgumentsBinding1_t02.valid().superTest(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t02.valid().superTestPositioned(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t02.valid().superTestPositioned(t1Instance, t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t02.valid().superTestNamed(t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t02.valid().superTestNamed(t1Instance, val2: t0Instance); +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t02.valid().superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ArgumentsBinding1_t02.valid().test(); +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A11_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A11_t01.dart index c08e4d3f7c..f7f32ef4c2 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A12_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A12_t01.dart index ba411a0416..216ab01da1 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A21_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A21_t01.dart index 1a4732d79a..811b07bd21 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A22_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A22_t01.dart index b3ad4f0497..cb3931fa7c 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A23_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A23_t01.dart index d7981335de..024356b6d9 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A31_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A31_t01.dart index 21e7462478..0148b7bbcc 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A32_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A32_t01.dart index 7e6490e23f..fea518320a 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A33_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A33_t01.dart index f6a899173e..238961a2e3 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A41_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A41_t01.dart index b7892e243b..faea1f823c 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A42_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A42_t01.dart index e31dd85dea..a957422adc 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A43_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A43_t01.dart index 7f02da66f2..bc4be8cc42 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A51_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A51_t01.dart index 855bc03de4..3ea662ad08 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A52_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A52_t01.dart index d633a757c4..892e8cbf7d 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A53_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A53_t01.dart index 2d3c064dbc..3b4514de9c 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A06_t01.dart new file mode 100644 index 0000000000..e3d2e316d5 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A06_t01.dart @@ -0,0 +1,157 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 not a subtype of a type T1, then it cannot +/// be used as a class member of type T1. Assignment to static and instance class +/// variables is tested. +/// @author sgrekhov@unipro.ru +/// @author ngl@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/class_member_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; + +const t1Default = f1Instance; + +class ClassMemberTestStatic { + static F1 s = t1Default; + + ClassMemberTestStatic(F0 val) { + s = val; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + + static staticTest() { + s = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + + static set staticSetter(F0 val) { + s = val; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + + static F1 get staticGetter => t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +class ClassMemberTestPublic { + F1 m = t1Default; + + ClassMemberTestPublic(F0 val) { + m = val; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + + ClassMemberTestPublic.short(this.m); + + ClassMemberTestPublic.validConstructor() {} + + test(F0 val) { + m = val; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + + set setter(F0 val) { + m = val; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + + F1 get getter => t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +class ClassMemberTestPrivate { + F1 _m = t1Default; + + ClassMemberTestPrivate(F0 val) { + _m = val; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + + ClassMemberTestPrivate.short(this._m); + + ClassMemberTestPrivate.validConstructor() {} + + test(F0 val) { + _m = val; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + + set setter(F0 val) { + _m = val; +// ^^^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +class ClassMemberTestInitFail { + static F1 s = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + F1 m = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + new ClassMemberTestPublic.validConstructor().m = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A11_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A11_t01.dart index 75e2ea72f0..cde7c602ed 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A12_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A12_t01.dart index de86d77e1d..76cf27a4c3 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A21_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A21_t01.dart index 0705d02ae3..65b5c8a90d 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A22_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A22_t01.dart index 6c488535e3..31703becf6 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A23_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A23_t01.dart index 0c5ada4ccc..066d559bf9 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A31_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A31_t01.dart index 41f0f2d78d..98d158b990 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A32_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A32_t01.dart index e71715f49b..06137edc25 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A33_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A33_t01.dart index 8a023f5d1a..b42b6e5796 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A41_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A41_t01.dart index b5d25047d1..ce9d097bc8 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A42_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A42_t01.dart index ad6dd91918..a7582a3352 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A43_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A43_t01.dart index 5c08b6251d..f8b18746ed 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A51_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A51_t01.dart index 86f43b9e42..198d02ce55 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A52_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A52_t01.dart index 6b2aa6178b..c0f2bab55a 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A53_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A53_t01.dart index 08a5974d26..c9ebb8910c 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A06_t01.dart new file mode 100644 index 0000000000..b4c1219ac3 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A06_t01.dart @@ -0,0 +1,77 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is not a subtype of a type T1, then +/// instance of T0 cannot be assigned to the mixin member of type T1. +/// Assignment to instance variable of super class is tested. +/// @author sgrekhov@unipro.ru +/// @author ngl@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/class_member_mixin_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; + +const t1Default = f1Instance; + +mixin class ClassMemberSuper1_t03 { + F1 m = t1Default; + void set superSetter(F1 val) {} +} + +class ClassMember1_t03 extends Object with ClassMemberSuper1_t03 { + test1() { + m = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + test2() { + superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + new ClassMember1_t03().m = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ClassMember1_t03().superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A11_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A11_t01.dart index 2ab7fd58c4..2183d49e33 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A12_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A12_t01.dart index e28b89c927..df83beba4f 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A21_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A21_t01.dart index ada8f7f4ba..a14cfe867f 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A22_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A22_t01.dart index 28d21d0e91..8953423f36 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A23_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A23_t01.dart index 5feaab51da..46f47dcc8f 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A31_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A31_t01.dart index 0f1592b1c4..dd01029e9a 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A32_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A32_t01.dart index 7bac2f8d8b..a27b1e0b3e 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A33_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A33_t01.dart index 29c42502bc..d6dafe6183 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A41_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A41_t01.dart index efb7c21977..d57054e8ad 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A42_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A42_t01.dart index 710827add9..42299d634a 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A43_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A43_t01.dart index 5cad9a01ec..eb5112f362 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A51_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A51_t01.dart index 36204c19fb..7c3183a378 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A52_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A52_t01.dart index c51a607348..6a1ae3010b 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A53_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A53_t01.dart index 55bbe37593..642e09b454 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A06_t01.dart new file mode 100644 index 0000000000..9a26e91a74 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A06_t01.dart @@ -0,0 +1,96 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is not a subtype of a type T1, then +/// instance of T0 cannot be assigned to the superclass member of type T1. +/// Assignment to variable of super class is tested. +/// @author sgrekhov@unipro.ru +/// @author ngl@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/class_member_super_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; + +const t1Default = f1Instance; + +class ClassMemberSuper1_t02 { + F1 m = t1Default; + + ClassMemberSuper1_t02(F0 value) { + m = value; +// ^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + ClassMemberSuper1_t02.named(F0 value) { + m = value; +// ^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + ClassMemberSuper1_t02.valid(F1 value) { + m = value; + } + void set superSetter(F1 val) {} +} + +class ClassMember1_t02 extends ClassMemberSuper1_t02 { + ClassMember1_t02() : super(t0Instance) {} + ClassMember1_t02.named() : super.named(t0Instance) {} + ClassMember1_t02.valid() : super.valid(t1Default); + test1() { + m = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + test2() { + superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + new ClassMember1_t02.valid().m = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + new ClassMember1_t02.valid().superSetter = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A11_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A11_t01.dart index d07d94909e..ff6f95f045 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A12_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A12_t01.dart index a5f2c9e157..e1337f56c8 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A21_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A21_t01.dart index dabe71ff6f..9831c6e403 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A22_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A22_t01.dart index 82766d2217..651d526e2a 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A23_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A23_t01.dart index 38e2055952..7a59eeab79 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A31_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A31_t01.dart index 9a603ed70f..a26f9cf1c6 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A32_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A32_t01.dart index 85d70dcef2..7f5f88926b 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A33_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A33_t01.dart index 9efcfb5794..a6390ec28c 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A41_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A41_t01.dart index f40b8bdfaf..56074422ad 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A42_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A42_t01.dart index 1bb22cca4a..6c941e0ed9 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A43_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A43_t01.dart index ab2a233750..8c74ef23a6 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A51_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A51_t01.dart index 8b22c01d15..f1b4562c8c 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A52_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A52_t01.dart index ebc9e9c9d1..0c598cb8b9 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A53_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A53_t01.dart index fe80dcee9b..2ef23959f9 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A06_t01.dart new file mode 100644 index 0000000000..ccc577cb79 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A06_t01.dart @@ -0,0 +1,81 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is not a subtype of a type T1, then +/// instance of T0 cannot be assigned to the to global variable of type T1. +/// Assignment to global variable is tested. +/// @author sgrekhov@unipro.ru +/// @author ngl@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/global_variable_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +class GlobalVariableTest { + GlobalVariableTest() { + t1Instance = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + + foo() { + t1Instance = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + static test() { + t1Instance = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + t1Instance = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + bar () { + t1Instance = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A11_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A11_t01.dart index 6ca1b324a9..aee8cf6850 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A12_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A12_t01.dart index b38d16ce46..d34a2d711a 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A21_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A21_t01.dart index 490ec7802b..8302123282 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A22_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A22_t01.dart index ae1fb21041..46ed0c14e0 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A23_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A23_t01.dart index c575af6066..0bec9141a4 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A31_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A31_t01.dart index 653512563e..a0439c75a9 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A32_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A32_t01.dart index f777b1c0fe..1bee96d228 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A33_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A33_t01.dart index 9d9ab8524f..cf4ed373fa 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A41_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A41_t01.dart index f29e64a219..c772ef69c3 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A42_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A42_t01.dart index 2912b305f4..5c5610d094 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A43_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A43_t01.dart index 3f19984ce1..f78864f8ae 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A51_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A51_t01.dart index ac2f45af46..0793e18267 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A52_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A52_t01.dart index 3a06395c61..522e11d884 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A53_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A53_t01.dart index 2f691e659f..3d4b140d32 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A06_t01.dart new file mode 100644 index 0000000000..af73a385a5 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A06_t01.dart @@ -0,0 +1,81 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is not a subtype of a type T1, then +/// instance of T0 cannot be assigned to the to local variable of type T1. +/// Assignment to local variable is tested. +/// @author sgrekhov@unipro.ru +/// @author ngl@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/local_variable_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; + +class LocalVariableTest { + LocalVariableTest() { + F1 t1 = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + + test() { + F1 t1 = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } + + static staticTest() { + F1 t1 = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } +} + +main() { + F1 t1 = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + bar () { + F1 t1 = t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + } +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A11_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A11_t01.dart index 568f52415b..f7d5d756b3 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A12_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A12_t01.dart index 8f015812ef..3d2325a69f 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A21_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A21_t01.dart index ee851b1fe6..63819f4345 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A22_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A22_t01.dart index 01937f072b..3d29c0e0d8 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A23_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A23_t01.dart index 80d6b92dc4..245e6355d3 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A31_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A31_t01.dart index a1a3014130..4ed077b181 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A32_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A32_t01.dart index 8ed5898805..8cdc563582 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A33_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A33_t01.dart index 274640e150..21d47cb91c 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A41_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A41_t01.dart index 405a88f67b..cc73e5384a 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A42_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A42_t01.dart index e2f0c0686a..78de6ef01f 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A43_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A43_t01.dart index 3781808653..3ce83c1d30 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A51_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A51_t01.dart index 63cc22123c..afad57451b 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A52_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A52_t01.dart index e08b9267a3..f61a4219b3 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A53_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A53_t01.dart index 2f420a1a90..3eecc490fe 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A06_t01.dart new file mode 100644 index 0000000000..0609adcc97 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A06_t01.dart @@ -0,0 +1,71 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 not a subtype of a type T1, then instance +/// of T0 cannot be used as a return value of type T1. Return value is tested. +/// @author sgrekhov@unipro.ru +/// @author ngl@unipro.ru +/// +/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// test_cases/return_value_fail_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; + +F1 returnValueFunc() => t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + +class ReturnValueTest { + static F1 staticTestMethod() => t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + F1 testMethod() => t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified + + F1 get testGetter => t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} + +main() { + F1 returnValueLocalFunc() => t0Instance; +// ^^^^^^^^^^ +// [analyzer] unspecified +// [cfe] unspecified +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A11_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A11_t01.dart index 7242e39323..4eb55e193b 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A11_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A11_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A12_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A12_t01.dart index 0f569d1ed2..e3924b47b3 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A12_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A12_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A21_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A21_t01.dart index 3ea8ba066d..888d3d1e3b 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A21_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A21_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A22_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A22_t01.dart index 0f43069536..8226015081 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A22_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A22_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A23_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A23_t01.dart index e9bbf8c4d6..908c20e206 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A23_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A23_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A31_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A31_t01.dart index 8b265d5fe6..8d4345c760 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A31_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A31_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A32_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A32_t01.dart index 97ee4a019f..99e204d929 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A32_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A32_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A33_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A33_t01.dart index fd9e4f2945..9d1272d4a5 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A33_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A33_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A41_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A41_t01.dart index 6b22233cda..73dcf58581 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A41_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A41_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A42_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A42_t01.dart index a8ec9922ab..3cd4e12018 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A42_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A42_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A43_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A43_t01.dart index 3ae697b9ca..96a60b30dc 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A43_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A43_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A51_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A51_t01.dart index 7bc76c01f5..3df6355c76 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A51_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A51_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A52_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A52_t01.dart index 55b384736b..5e1aaa32b6 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A52_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A52_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A53_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A53_t01.dart index 5cd087aff1..fa1d1de363 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A53_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A53_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A01_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A01_t01.dart index 94d5140166..c480a60c42 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A01_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A01_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A02_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A02_t01.dart index c5973444ca..95b213858d 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A02_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A02_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A03_t01.dart index 6d81048714..8a23c565d0 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A03_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A03_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A04_t01.dart index c709d9b445..faca6bd4bd 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A04_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A04_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A05_t01.dart index a501a4a2c5..31e358a122 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A05_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A05_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A06_t01.dart new file mode 100644 index 0000000000..e7bfb54249 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_global_variable_A06_t01.dart @@ -0,0 +1,68 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be assigned to the to global variable of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/global_variable_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +class GlobalVariableTest { + GlobalVariableTest() { + t1Instance = t0Instance; + } + + foo() { + t1Instance = t0Instance; + } + + static test() { + t1Instance = t0Instance; + } +} + +main() { + bar () { + t1Instance = t0Instance; + } + + t1Instance = t0Instance; + bar(); + GlobalVariableTest t = new GlobalVariableTest(); + t.foo(); + GlobalVariableTest.test(); +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A01_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A01_t01.dart index a3fbe5900c..ae3f8af7a0 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A01_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A01_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A02_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A02_t01.dart index 9ef3b74ca0..93b0838b55 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A02_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A02_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A03_t01.dart index c1e80568df..4d9657dcc6 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A03_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A03_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A04_t01.dart index abe398f8f3..a4ec9e3fc4 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A04_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A04_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A05_t01.dart index 74759ce0cc..0aa1e5bd53 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A05_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A05_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A06_t01.dart new file mode 100644 index 0000000000..e482b1915b --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_local_variable_A06_t01.dart @@ -0,0 +1,73 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be assigned to the to local variable of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/local_variable_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; + +class LocalVariableTest { + + LocalVariableTest() { + F1 t1 = t0Instance; + t1 = t0Instance; + } + + static staticTest() { + F1 t1 = t0Instance; + t1 = t0Instance; + } + + test() { + F1 t1 = t0Instance; + t1 = t0Instance; + } +} + +main() { + foo() { + F1 t1 = t0Instance; + t1 = t0Instance; + } + + F1 t1 = t0Instance; + t1 = t0Instance; + foo(); + LocalVariableTest x = new LocalVariableTest(); + x.test(); + LocalVariableTest.staticTest(); +} diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A01_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A01_t01.dart index 573acde209..c13ffbcbc9 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A01_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A01_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A02_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A02_t01.dart index 9e5ae67ab5..2accc2d332 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A02_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A02_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A03_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A03_t01.dart index 058d0a9a99..07d49daaaf 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A03_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A03_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A04_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A04_t01.dart index eab33a4624..a2d69d6ab8 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A04_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A04_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A05_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A05_t01.dart index afca62479a..0969720fef 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A05_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A05_t01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A06_t01.dart new file mode 100644 index 0000000000..2c8d53f238 --- /dev/null +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_return_value_A06_t01.dart @@ -0,0 +1,63 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com +/// +/// @description Check that if type T0 is a subtype of a type T1, then instance +/// of T0 can be used as a return value of type T1 +/// @author sgrekhov@unipro.ru +/// +/// This test is generated from test_types/named_function_types_A06.dart and +/// test_cases/return_value_x01.dart. Don't modify it! +/// If you need to change this test, then change one of the files above and then +/// run generator/generator.dart to regenerate the tests. + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; + +F1 returnValueFunc() => t0Instance; + +class ReturnValueTest { + static F1 staticTestMethod() => t0Instance; + + F1 testMethod() => t0Instance; + + F1 get testGetter => t0Instance; +} + +main() { + F1 returnValueLocalFunc() => t0Instance; + + returnValueFunc(); + returnValueLocalFunc(); + + ReturnValueTest.staticTestMethod(); + + new ReturnValueTest().testMethod(); + new ReturnValueTest().testGetter; +} diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_A01.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_A01.dart index d665071a1c..734ad048f4 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_A01.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_A01.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_A02.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_A02.dart index f8c213c9f0..4617c01c90 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_A02.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_A02.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_A03.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_A03.dart index 6988c929a3..3fca8e3771 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_A03.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_A03.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with high-level types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_A04.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_A04.dart index 10e4016807..3cd78086ab 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_A04.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_A04.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types with Null type /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_A05.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_A05.dart index dd16f657ba..458faf357f 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_A05.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_A05.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subset of {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if T0 and T1 satisfies the rules above, then T0 is /// subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_A06.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_A06.dart new file mode 100644 index 0000000000..2e8ae4f422 --- /dev/null +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_A06.dart @@ -0,0 +1,38 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a named argument and `T1` has a required +/// named argument of the same type, then T0 is a subtype of T1. +/// @author sgrekhov22@gmail.com + +typedef void F0({int i}); +typedef void F1({required int i}); + +void f0Instance({int i = 0}) {} +void f1Instance({required int i}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +//# @T0 = F0 +//# @T1 = F1 diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A061.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A061.dart new file mode 100644 index 0000000000..2756b1cb10 --- /dev/null +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A061.dart @@ -0,0 +1,39 @@ +// Copyright (c) 2023, the Dart project authors. Please see the AUTHORS file +// for details. All rights reserved. Use of this source code is governed by a +// BSD-style license that can be found in the LICENSE file. + +/// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} +/// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n +/// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required +/// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] +/// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k +/// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// +/// @description Check that if `T0` has a required named argument and `T1` has +/// not required named argument of the same type and with the same name, then +/// anyway `T0` is a subtype of `T1`. +/// @author sgrekhov22@gmail.com + +typedef void F0({required int i}); +typedef void F1({int i}); + +void f0Instance({required int i}) {} +void f1Instance({int i = 0}) {} + +F0 t0Instance = f0Instance; +F1 t1Instance = f1Instance; + +const t1Default = f1Instance; + +//# @T0 = F0 +//# @T1 = F1 diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A11.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A11.dart index 49d4984862..50b27be7fb 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A11.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A11.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A12.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A12.dart index fda284a5e4..efd583db31 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A12.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A12.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if {yn+1, ..., yq} is not subsetof {xn+1, ..., xm}, /// then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A21.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A21.dart index 70aff7bad8..1707ca91ea 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A21.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A21.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A22.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A22.dart index 3aa011b7b7..1a1aa2946f 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A22.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A22.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A23.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A23.dart index bded1944ae..721d5f6e8e 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A23.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A23.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in 0...n such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Vi[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A31.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A31.dart index bff937348c..ca549f0c8b 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A31.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A31.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1 diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A32.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A32.dart index a0567f3086..b301431d4b 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A32.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A32.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A33.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A33.dart index bc01f200f7..f25cef18f3 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A33.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A33.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if there is i in n+1...q such that /// Si[Z0/Y0, ..., Zk/Yk] is not subtype of Tj[Z0/X0, ..., Zk/Xk], then T0 is /// not a subtype of T1. Test generic types diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A41.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A41.dart index da953f8abf..d809c8e5d5 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A41.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A41.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A42.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A42.dart index 5f62e44907..d21473fd96 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A42.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A42.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A43.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A43.dart index cefecc9d01..9dd4f65893 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A43.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A43.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if U0[Z0/X0, ..., Zk/Xk] is not a subtype of /// U1[Z0/Y0, ..., Zk/Yk], then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A51.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A51.dart index 5ce21f667b..f8850eb844 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A51.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A51.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1 /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A52.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A52.dart index 1801b7b16f..5275dd40e7 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A52.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A52.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A53.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A53.dart index 9305c4e220..301acc56c3 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A53.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A53.dart @@ -3,17 +3,22 @@ // BSD-style license that can be found in the LICENSE file. /// @assertion A type T0 is a subtype of a type T1 (written T0 <: T1) when: -/// Named Function Types: T0 is U0 Function -/// (T0 x0, ..., Tn xn, {Tn+1 xn+1, ..., Tm xm}) -/// -/// and T1 is U1 Function(S0 y0, ..., Sn yn, -/// {Sn+1 yn+1, ..., Sq yq}) -/// and {yn+1, ..., yq} subsetof {xn+1, ..., xm} +/// Named Function Types: +/// T0 is U0 Function(V0 x0, ..., Vn xn, +/// {r0n+1 Vn+1 xn+1, ..., r0m Vm xm}) where r0j is empty or required for j in +/// n+1...m +/// and T1 is U1 Function(S0 y0, ..., +/// Sn yn, {r1n+1 Sn+1 yn+1, ..., r1q Sq yq}) where r1j is empty or required +/// for j in n+1...q +/// and {yn+1, ... , yq} subsetof {xn+1, ... , xm} /// and Si[Z0/Y0, ..., Zk/Yk] <: Vi[Z0/X0, ..., Zk/Xk] for i in 0...n /// and Si[Z0/Y0, ..., Zk/Yk] <: Tj[Z0/X0, ..., Zk/Xk] for i in n+1...q, yj = xi +/// and for each j such that r0j is required, then there exists an i in n+1...q +/// such that xj = yi, and r1i is required /// and U0[Z0/X0, ..., Zk/Xk] <: U1[Z0/Y0, ..., Zk/Yk] /// and B0i[Z0/X0, ..., Zk/Xk] === B1i[Z0/Y0, ..., Zk/Yk] for i in 0...k /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] +/// /// @description Check that if B0i[Z0/X0, ..., Zk/Xk] !== B1i[Z0/Y0, ..., Zk/Yk] /// for any i in 0...k, then T0 is not a subtype of T1. Test generic types /// @author sgrekhov@unipro.ru From ffe197c39f921a1380d7952f9117c153c5accd72 Mon Sep 17 00:00:00 2001 From: "Sergey G. Grekhov" Date: Mon, 10 Jul 2023 13:34:55 +0300 Subject: [PATCH 2/2] File naming and description text fixed --- ...function_types_fail_arguments_binding_fail_A61_t01.dart} | 6 +++--- ...function_types_fail_arguments_binding_fail_A61_t02.dart} | 6 +++--- ...function_types_fail_arguments_binding_fail_A61_t03.dart} | 6 +++--- ...amed_function_types_fail_class_member_fail_A61_t01.dart} | 6 +++--- ...amed_function_types_fail_class_member_fail_A61_t02.dart} | 6 +++--- ...amed_function_types_fail_class_member_fail_A61_t03.dart} | 6 +++--- ...d_function_types_fail_global_variable_fail_A61_t01.dart} | 6 +++--- ...ed_function_types_fail_local_variable_fail_A61_t01.dart} | 6 +++--- ...amed_function_types_fail_return_value_fail_A61_t01.dart} | 6 +++--- ...function_types_fail_arguments_binding_fail_A61_t01.dart} | 6 +++--- ...on_types_fail_arguments_binding_mixin_fail_A61_t01.dart} | 6 +++--- ...on_types_fail_arguments_binding_super_fail_A61_t01.dart} | 6 +++--- ...amed_function_types_fail_class_member_fail_A61_t01.dart} | 6 +++--- ...unction_types_fail_class_member_mixin_fail_A61_t01.dart} | 6 +++--- ...unction_types_fail_class_member_super_fail_A61_t01.dart} | 6 +++--- ...d_function_types_fail_global_variable_fail_A61_t01.dart} | 6 +++--- ...ed_function_types_fail_local_variable_fail_A61_t01.dart} | 6 +++--- ...amed_function_types_fail_return_value_fail_A61_t01.dart} | 6 +++--- ...es_fail_A061.dart => named_function_types_fail_A61.dart} | 4 ++-- 19 files changed, 56 insertions(+), 56 deletions(-) rename LanguageFeatures/Subtyping/dynamic/generated/{named_function_types_fail_arguments_binding_fail_A06_t01.dart => named_function_types_fail_arguments_binding_fail_A61_t01.dart} (98%) rename LanguageFeatures/Subtyping/dynamic/generated/{named_function_types_fail_arguments_binding_fail_A06_t02.dart => named_function_types_fail_arguments_binding_fail_A61_t02.dart} (98%) rename LanguageFeatures/Subtyping/dynamic/generated/{named_function_types_fail_arguments_binding_fail_A06_t03.dart => named_function_types_fail_arguments_binding_fail_A61_t03.dart} (98%) rename LanguageFeatures/Subtyping/dynamic/generated/{named_function_types_fail_class_member_fail_A06_t01.dart => named_function_types_fail_class_member_fail_A61_t01.dart} (98%) rename LanguageFeatures/Subtyping/dynamic/generated/{named_function_types_fail_class_member_fail_A06_t02.dart => named_function_types_fail_class_member_fail_A61_t02.dart} (97%) rename LanguageFeatures/Subtyping/dynamic/generated/{named_function_types_fail_class_member_fail_A06_t03.dart => named_function_types_fail_class_member_fail_A61_t03.dart} (96%) rename LanguageFeatures/Subtyping/dynamic/generated/{named_function_types_fail_global_variable_fail_A06_t01.dart => named_function_types_fail_global_variable_fail_A61_t01.dart} (95%) rename LanguageFeatures/Subtyping/dynamic/generated/{named_function_types_fail_local_variable_fail_A06_t01.dart => named_function_types_fail_local_variable_fail_A61_t01.dart} (95%) rename LanguageFeatures/Subtyping/dynamic/generated/{named_function_types_fail_return_value_fail_A06_t01.dart => named_function_types_fail_return_value_fail_A61_t01.dart} (95%) rename LanguageFeatures/Subtyping/static/generated/{named_function_types_fail_arguments_binding_fail_A06_t01.dart => named_function_types_fail_arguments_binding_fail_A61_t01.dart} (98%) rename LanguageFeatures/Subtyping/static/generated/{named_function_types_fail_arguments_binding_mixin_fail_A06_t01.dart => named_function_types_fail_arguments_binding_mixin_fail_A61_t01.dart} (97%) rename LanguageFeatures/Subtyping/static/generated/{named_function_types_fail_arguments_binding_super_fail_A06_t01.dart => named_function_types_fail_arguments_binding_super_fail_A61_t01.dart} (98%) rename LanguageFeatures/Subtyping/static/generated/{named_function_types_fail_class_member_fail_A06_t01.dart => named_function_types_fail_class_member_fail_A61_t01.dart} (96%) rename LanguageFeatures/Subtyping/static/generated/{named_function_types_fail_class_member_mixin_fail_A06_t01.dart => named_function_types_fail_class_member_mixin_fail_A61_t01.dart} (95%) rename LanguageFeatures/Subtyping/static/generated/{named_function_types_fail_class_member_super_fail_A06_t01.dart => named_function_types_fail_class_member_super_fail_A61_t01.dart} (95%) rename LanguageFeatures/Subtyping/static/generated/{named_function_types_fail_global_variable_fail_A06_t01.dart => named_function_types_fail_global_variable_fail_A61_t01.dart} (95%) rename LanguageFeatures/Subtyping/static/generated/{named_function_types_fail_local_variable_fail_A06_t01.dart => named_function_types_fail_local_variable_fail_A61_t01.dart} (95%) rename LanguageFeatures/Subtyping/static/generated/{named_function_types_fail_return_value_fail_A06_t01.dart => named_function_types_fail_return_value_fail_A61_t01.dart} (95%) rename LanguageFeatures/Subtyping/test_types/{named_function_types_fail_A061.dart => named_function_types_fail_A61.dart} (93%) diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A61_t01.dart similarity index 98% rename from LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A61_t01.dart index ad014a83da..23c3548854 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A61_t01.dart @@ -20,15 +20,15 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 not a subtype of a type T1, then it cannot /// be used as an argument of type T1 /// @author sgrekhov@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/arguments_binding_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A61_t02.dart similarity index 98% rename from LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t02.dart rename to LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A61_t02.dart index a98c4894f2..9f283cab10 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A61_t02.dart @@ -20,15 +20,15 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 not a subtype of a type T1, then it cannot /// be used as an argument of type T1. Test superclass members /// @author sgrekhov@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/arguments_binding_fail_x02.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A61_t03.dart similarity index 98% rename from LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t03.dart rename to LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A61_t03.dart index 20dfb1c57f..a527bdb061 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A06_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_arguments_binding_fail_A61_t03.dart @@ -20,15 +20,15 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 not a subtype of a type T1, then it cannot /// be used as an argument of type T1. Test mixin members /// @author sgrekhov@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/arguments_binding_fail_x03.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A61_t01.dart similarity index 98% rename from LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A61_t01.dart index f7be1945b2..825a42fb4a 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A61_t01.dart @@ -20,15 +20,15 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 not a subtype of a type T1, then it cannot /// be used as a class member of type T1 /// @author sgrekhov@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/class_member_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t02.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A61_t02.dart similarity index 97% rename from LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t02.dart rename to LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A61_t02.dart index 616702ce10..089170f2c3 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t02.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A61_t02.dart @@ -20,15 +20,15 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 is not a subtype of a type T1, then /// instance of T0 cannot be assigned to the superclass member of type T1 /// @author sgrekhov@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/class_member_fail_x02.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t03.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A61_t03.dart similarity index 96% rename from LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t03.dart rename to LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A61_t03.dart index 2e7676783e..e99ecc763c 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A06_t03.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_class_member_fail_A61_t03.dart @@ -20,15 +20,15 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 is not a subtype of a type T1, then /// instance of T0 cannot be assigned to the mixin member of type T1 /// @author sgrekhov@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/class_member_fail_x03.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A61_t01.dart similarity index 95% rename from LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A61_t01.dart index 903df4f8bb..2ba2e9ab90 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_global_variable_fail_A61_t01.dart @@ -20,15 +20,15 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 is not a subtype of a type T1, then /// instance of T0 cannot be assigned to the to global variable of type T1 /// @author sgrekhov@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/global_variable_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A61_t01.dart similarity index 95% rename from LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A61_t01.dart index 3d08a8f1cc..5632b6d615 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_local_variable_fail_A61_t01.dart @@ -20,15 +20,15 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 is not a subtype of a type T1, then /// instance of T0 cannot be assigned to the to local variable of type T1 /// @author sgrekhov@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/local_variable_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A06_t01.dart b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A61_t01.dart similarity index 95% rename from LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A61_t01.dart index caef31303e..34e77451d8 100644 --- a/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/dynamic/generated/named_function_types_fail_return_value_fail_A61_t01.dart @@ -20,15 +20,15 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 not a subtype of a type T1, then instance /// of T0 cannot be used as a return value of type T1 /// @author sgrekhov@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/return_value_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A61_t01.dart similarity index 98% rename from LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A61_t01.dart index 6bb43c88e7..5185464e17 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_fail_A61_t01.dart @@ -20,8 +20,8 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 not a subtype of a type T1, then it cannot @@ -29,7 +29,7 @@ /// tested. /// @author sgrekhov@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/arguments_binding_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A61_t01.dart similarity index 97% rename from LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A61_t01.dart index 158dd6e484..d556f6c216 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_mixin_fail_A61_t01.dart @@ -20,8 +20,8 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 not a subtype of a type T1, then it cannot @@ -30,7 +30,7 @@ /// @author sgrekhov@unipro.ru /// @author ngl@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/arguments_binding_mixin_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A61_t01.dart similarity index 98% rename from LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A61_t01.dart index 8a09b1dc97..e88e529667 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_arguments_binding_super_fail_A61_t01.dart @@ -20,8 +20,8 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 not a subtype of a type T1, then it cannot @@ -30,7 +30,7 @@ /// @author sgrekhov@unipro.ru /// @author ngl@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/arguments_binding_super_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A61_t01.dart similarity index 96% rename from LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A61_t01.dart index e3d2e316d5..7516f2062b 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_fail_A61_t01.dart @@ -20,8 +20,8 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 not a subtype of a type T1, then it cannot @@ -30,7 +30,7 @@ /// @author sgrekhov@unipro.ru /// @author ngl@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/class_member_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A61_t01.dart similarity index 95% rename from LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A61_t01.dart index b4c1219ac3..126d59fc93 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_mixin_fail_A61_t01.dart @@ -20,8 +20,8 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 is not a subtype of a type T1, then @@ -30,7 +30,7 @@ /// @author sgrekhov@unipro.ru /// @author ngl@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/class_member_mixin_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A61_t01.dart similarity index 95% rename from LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A61_t01.dart index 9a26e91a74..b3e4fdca19 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_class_member_super_fail_A61_t01.dart @@ -20,8 +20,8 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 is not a subtype of a type T1, then @@ -30,7 +30,7 @@ /// @author sgrekhov@unipro.ru /// @author ngl@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/class_member_super_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A61_t01.dart similarity index 95% rename from LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A61_t01.dart index ccc577cb79..cbd60f7f7c 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_global_variable_fail_A61_t01.dart @@ -20,8 +20,8 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 is not a subtype of a type T1, then @@ -30,7 +30,7 @@ /// @author sgrekhov@unipro.ru /// @author ngl@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/global_variable_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A61_t01.dart similarity index 95% rename from LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A61_t01.dart index af73a385a5..ae4bafa511 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_local_variable_fail_A61_t01.dart @@ -20,8 +20,8 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 is not a subtype of a type T1, then @@ -30,7 +30,7 @@ /// @author sgrekhov@unipro.ru /// @author ngl@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/local_variable_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A06_t01.dart b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A61_t01.dart similarity index 95% rename from LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A06_t01.dart rename to LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A61_t01.dart index 0609adcc97..197327d4dd 100644 --- a/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A06_t01.dart +++ b/LanguageFeatures/Subtyping/static/generated/named_function_types_fail_return_value_fail_A61_t01.dart @@ -20,8 +20,8 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com /// /// @description Check that if type T0 not a subtype of a type T1, then instance @@ -29,7 +29,7 @@ /// @author sgrekhov@unipro.ru /// @author ngl@unipro.ru /// -/// This test is generated from test_types/named_function_types_fail_A061.dart and +/// This test is generated from test_types/named_function_types_fail_A61.dart and /// test_cases/return_value_fail_x01.dart. Don't modify it! /// If you need to change this test, then change one of the files above and then /// run generator/generator.dart to regenerate the tests. diff --git a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A061.dart b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A61.dart similarity index 93% rename from LanguageFeatures/Subtyping/test_types/named_function_types_fail_A061.dart rename to LanguageFeatures/Subtyping/test_types/named_function_types_fail_A61.dart index 2756b1cb10..62d789bfa9 100644 --- a/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A061.dart +++ b/LanguageFeatures/Subtyping/test_types/named_function_types_fail_A61.dart @@ -20,8 +20,8 @@ /// where the Zi are fresh type variables with bounds B0i[Z0/X0, ..., Zk/Xk] /// /// @description Check that if `T0` has a required named argument and `T1` has -/// not required named argument of the same type and with the same name, then -/// anyway `T0` is a subtype of `T1`. +/// an optional named argument of the same type and with the same name, then +/// `T0` is not a subtype of `T1`. /// @author sgrekhov22@gmail.com typedef void F0({required int i});