mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-04 18:58:30 +00:00
fix: transpiler bug
This commit is contained in:
parent
5fe79c1d41
commit
918f146d08
2 changed files with 44 additions and 11 deletions
|
@ -560,7 +560,9 @@ impl Context {
|
|||
(ty @ (Type | ClassType | TraitType), Poly { name, params })
|
||||
if &name[..] == "Array" || &name[..] == "UnsizedArray" || &name[..] == "Set" =>
|
||||
{
|
||||
let elem_t = self.convert_tp_into_type(params[0].clone()).unwrap();
|
||||
let Ok(elem_t) = self.convert_tp_into_type(params[0].clone()) else {
|
||||
return false;
|
||||
};
|
||||
self.supertype_of(ty, &elem_t)
|
||||
}
|
||||
(ty @ (Type | ClassType | TraitType), Poly { name, params })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue