Type Checking Bug on Sparse Vertical Index Fields
Stagno opened this issue · 0 comments
Stagno commented
Currently, the type checking on index fields is too strict. Consider:
@stencil
def a_stencil(
a: Field[Cell, K],
b: Field[Edge, K],
test_field: IndexField[Cell > Edge, K]
):
with domain.upward as k:
a = sum_over(Cell > Edge, b[test_field])
this is rejected by the dimensions checker because the types of b
and test_field
are different. However, this is clearly a sensible example. The type checking should not enforce that b
and test_field
have the same type, but that both types are valid in the current iteration space.
NOTE: This issue was updated because it was initially thought that sparse index fields are not supported at all.