Skip to content

Commit 3ee5c28

Browse files
committed
fix
1 parent 6497dd4 commit 3ee5c28

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

compiler/codegen/src/compile.rs

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1348,10 +1348,20 @@ impl Compiler<'_> {
13481348
}
13491349
};
13501350
}
1351+
1352+
// Build tuple of type parameters
1353+
for type_param in &type_params.type_params {
1354+
match type_param {
1355+
TypeParam::TypeVar(tv) => self.load_name(tv.name.as_str())?,
1356+
TypeParam::ParamSpec(ps) => self.load_name(ps.name.as_str())?,
1357+
TypeParam::TypeVarTuple(tvt) => self.load_name(tvt.name.as_str())?,
1358+
}
1359+
}
1360+
13511361
emit!(
13521362
self,
13531363
Instruction::BuildTuple {
1354-
size: u32::try_from(type_params.len()).unwrap(),
1364+
size: u32::try_from(type_params.type_params.len()).unwrap(),
13551365
}
13561366
);
13571367
Ok(())
@@ -1762,8 +1772,6 @@ impl Compiler<'_> {
17621772
wrapper_name.clone(),
17631773
);
17641774

1765-
// Compile type parameters
1766-
17671775
// Compile type parameters
17681776
for type_param in &type_params.type_params {
17691777
match type_param {

0 commit comments

Comments
 (0)