Skip to content

Commit

Permalink
Updated types
Browse files Browse the repository at this point in the history
  • Loading branch information
Daquiver1 committed Nov 29, 2023
1 parent 4bdae74 commit 4c350bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions projects/jdwp/codegen/dataclass_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def nested_structs(root: Struct) -> typing.Generator[StructLink, None, None]:
type = field.type
match type:
case Array():
yield root, field, type.element_type
yield root, field, typing.cast(Array, type).element_type
yield from nested_structs(typing.cast(Array, type).element_type)
case TaggedUnion():
for struct in typing.cast(TaggedUnion, type).cases.values():
Expand All @@ -85,7 +85,7 @@ def compute_struct_names(root: Struct, name: str) -> typing.Mapping[Struct, str]
case Array():
names[nested] = f"{names[parent]}{field.name.capitalize()}Element"
case TaggedUnion():
for case_value, case_struct in field.type.cases.items():
for case_value, case_struct in typing.cast(TaggedUnion, type).cases.items():
case_name = format_enum_name(case_value)
names[
case_struct
Expand Down

0 comments on commit 4c350bd

Please sign in to comment.