Skip to content

Commit 4bf17c6

Browse files
alexisthedevtheosotr
authored andcommitted
Change assertion statement to include union type cases
1 parent 123d20a commit 4bf17c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/generators/generator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2899,8 +2899,8 @@ def _create_type_params_from_etype(self, etype: tp.Type):
28992899
type_params[0].variance = tp.Invariant
29002900
return type_params, {etype: type_params[0]}, True
29012901

2902-
# the given type is parameterized
2903-
assert isinstance(etype, (tp.ParameterizedType, tp.WildCardType))
2902+
# the given type is combound
2903+
assert etype.is_combound() or etype.is_wildcard()
29042904
type_vars = etype.get_type_variables(self.bt_factory)
29052905
type_params = self.gen_type_params(
29062906
len(type_vars), with_variance=self.language == 'kotlin')

0 commit comments

Comments
 (0)