Ignore:
Timestamp:
Oct 21, 2022, 12:13:25 PM (18 months ago)
Author:
Michael Brooks <mlbrooks@…>
Branches:
ADT, ast-experimental, master
Children:
9e042d8
Parents:
8bd886e
Message:

Improve new-array subscripting to cover missing cases.

Missing cases include acknowledging a[0] and a[1] as required uses; therefore, give them
special overloads. Add comments to explain why.

Missing cases include test coverage of these overloads (where tests actually fail when an overload
is missing). Perhaps surprisingly, you need to use a lot of features at the same time for the need
for several overloads to obtain; make test coverage go there.

Also, switch thesis's demo of mutidimensional transposing/slicing to use (improved) libcfa ar
(pseudo-)trait, in place of former ix trait. Therefore, also port this demo to new array
syntax. (No changes to thesis discussion around this demo yet; these are still pending.) All
in, cause this thesis demo to be runnable again.

Location:
tests/array-container
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • tests/array-container/array-basic.cfa

    r8bd886e ra5e2682  
    7878}
    7979
    80 forall( A & | ar(A, float) )
     80forall( [N], A & | ar(A, float, N) )
    8181float total1d_hi( A & a ) {
    8282    float total = 0.0f;
    83     for (i; a`len)
     83    for (i; N)
    8484        total += a[i];
    8585    return total;
Note: See TracChangeset for help on using the changeset viewer.