Skip to content

Commit bc95e8d

Browse files
committed
shallow_const, deep_const, safe_realtype_unconst: Ignore TVector
1 parent d85a1ad commit bc95e8d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

py/dml/types.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ def conv_const(const, t):
173173

174174
def safe_realtype_unconst(t0):
175175
def sub(t):
176-
if isinstance(t, (TArray, TVector)):
176+
if isinstance(t, TArray):
177177
base = sub(t.base)
178178
if t.const or base is not t.base:
179179
t = t.clone()
@@ -187,7 +187,7 @@ def sub(t):
187187

188188
def shallow_const(t):
189189
t = safe_realtype_shallow(t)
190-
while not t.const and isinstance(t, (TArray, TVector)):
190+
while not t.const and isinstance(t, TArray):
191191
t = safe_realtype_shallow(t.base)
192192

193193
return t.const
@@ -198,7 +198,7 @@ def deep_const(origt):
198198
st = safe_realtype_shallow(subtypes.pop())
199199
if st.const:
200200
return True
201-
if isinstance(st, (TArray, TVector)):
201+
if isinstance(st, TArray):
202202
subtypes.append(st.base)
203203
elif isinstance(st, StructType):
204204
subtypes.extend(st.members.values())

0 commit comments

Comments
 (0)