Skip to content

Commit 0fbc4c4

Browse files
Fix codegen crashes for intersection types and complex list inner typesCI
1 parent 92dea66 commit 0fbc4c4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/replit_river/codegen/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def {_field_name}(
407407
encoder_parts.append(("isinstance(x, str)", "x"))
408408
elif t.type == "array":
409409
match type_name:
410-
case ListTypeExpr(inner_type_name):
410+
case ListTypeExpr(inner_type_name) if isinstance(inner_type_name, TypeName):
411411
# Primitives don't need encoding
412412
inner_type_str = render_literal_type(inner_type_name)
413413
if inner_type_str in ("str", "int", "float", "bool", "Any"):

0 commit comments

Comments
 (0)