File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed
lkql_checker/share/lkql/kp
testsuite/tests/checks/KP-TA30-032 Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 44import stdlib
55
66fun range_length(t) =
7- match t.f_type_def.f_indices.f_types[1]
7+ match t.p_base_subtype(). f_type_def.f_indices.f_types[1]
88 | u@UnconstrainedArrayIndex => stdlib.number_of_values(
99 u.f_subtype_name.p_referenced_decl()
1010 )
Original file line number Diff line number Diff line change @@ -12,4 +12,7 @@ package Simple is
1212 type Element_Array is array (Index_Range range <>) of Element;
1313 Null_Element_Array : Element_Array (1 .. 0 ); -- FLAG
1414
15+ subtype Sub_Element_Array is Element_Array;
16+ Null_Sub_Element_Array : Sub_Element_Array (1 .. 0 ); -- FLAG
17+
1518end Simple ;
Original file line number Diff line number Diff line change @@ -6,3 +6,7 @@ simple.ads:13:4: rule violation: possible occurrence of KP TA30-032
6613 | Null_Element_Array : Element_Array (1 .. 0); -- FLAG
77 | ^^^^^^^^^^^^^^^^^^
88
9+ simple.ads:16:4: rule violation: possible occurrence of KP TA30-032
10+ 16 | Null_Sub_Element_Array : Sub_Element_Array (1 .. 0); -- FLAG
11+ | ^^^^^^^^^^^^^^^^^^^^^^
12+
You can’t perform that action at this time.
0 commit comments