From 74bd50b954a8ef4db7631ed8fa8b03e3155c06a4 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sun, 6 Mar 2022 13:27:47 -0600 Subject: [PATCH] Traverse Subscript's indices in TypeInferenceMapper.map_subscript --- loopy/type_inference.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/loopy/type_inference.py b/loopy/type_inference.py index 89571836e..48324c424 100644 --- a/loopy/type_inference.py +++ b/loopy/type_inference.py @@ -399,6 +399,10 @@ class TypeInferenceMapper(CombineMapper): return [expr.type] def map_subscript(self, expr): + # The subscript may contain function calls, and we won't type-specialize + # them if we don't see them. + self.rec(expr.index) + return self.rec(expr.aggregate) def map_linear_subscript(self, expr): -- GitLab