mirror of
https://github.com/erg-lang/erg.git
synced 2025-08-03 18:29:00 +00:00
fix: unintended behavior for collections
This commit is contained in:
parent
daf01f3cf2
commit
7d7849b493
9 changed files with 66 additions and 17 deletions
|
@ -2661,13 +2661,27 @@ impl PyCodeGenerator {
|
|||
self.emit_push_null();
|
||||
self.emit_load_name_instr(Identifier::public("Str"));
|
||||
}
|
||||
other if other.is_array() => {
|
||||
self.emit_push_null();
|
||||
self.emit_load_name_instr(Identifier::public("Array"));
|
||||
}
|
||||
_ => {
|
||||
wrapped = false;
|
||||
}
|
||||
other => match &other.qual_name()[..] {
|
||||
"Array" => {
|
||||
self.emit_push_null();
|
||||
self.emit_load_name_instr(Identifier::public("Array"));
|
||||
}
|
||||
"Dict" => {
|
||||
self.emit_push_null();
|
||||
self.emit_load_name_instr(Identifier::public("Dict"));
|
||||
}
|
||||
"Set" => {
|
||||
self.emit_push_null();
|
||||
self.emit_load_name_instr(Identifier::public("Set"));
|
||||
}
|
||||
"Tuple" => {
|
||||
self.emit_push_null();
|
||||
self.emit_load_name_instr(Identifier::public("tuple"));
|
||||
}
|
||||
_ => {
|
||||
wrapped = false;
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
match expr {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue