diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c6226d795118fe85488e4d1e4f8793d4e54e77a..fc86ce0e5743d0e3f5e2ba556a3de0a75c3ad07e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,7 +38,7 @@ jobs: . ./prepare-and-run-pylint.sh loopy test/test_*.py pytest3: - name: Conda Pytest Py3 + name: Conda Pytest runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -49,7 +49,7 @@ jobs: . ./build-and-test-py-project-within-miniconda.sh pytest_twice: - name: Pytest twice (for cache behavior) on Py${{ matrix.python-version }} + name: Conda Pytest Twice (for cache behavior) runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 diff --git a/loopy/check.py b/loopy/check.py index 4588a59b48bab0b9122902878c6aa5d96cf6ed8f..f98abf3e947bc637bfc971a04ad0157aba6b8b6b 100644 --- a/loopy/check.py +++ b/loopy/check.py @@ -72,7 +72,13 @@ VALID_NOSYNC_SCOPES = frozenset(["local", "global", "any"]) class SubscriptIndicesIsIntChecker(TypeInferenceMapper): def map_subscript(self, expr): for idx in expr.index_tuple: - if not self.rec(idx)[0].is_integral(): + type_inf_result = self.rec(idx) + if not type_inf_result: + raise LoopyError( + "When checking that subscript indices are integral: " + "Type inference did not find type of '%s'" + % idx) + if not type_inf_result[0].is_integral(): raise LoopyError("Non-integral array indices obtained in" " {}.".format(expr))