Fixed #1891 AS3 - duplicate variable declaration in some cases

This commit is contained in:
Jindra Petřík
2022-11-26 14:58:04 +01:00
parent 3bb4fcb057
commit 7b15db82b8
2 changed files with 10 additions and 0 deletions

View File

@@ -11,6 +11,7 @@ All notable changes to this project will be documented in this file.
- [#1890] AS3 - Chained assignments in some special cases
- [#1810] AS3 Direct editation - XML attribute handling
- [#1810] AS3 Direct editation - Calls inside submethods using this
- [#1891] AS3 - duplicate variable declaration in some cases
## [17.0.2] - 2022-11-22
### Fixed
@@ -2656,6 +2657,7 @@ All notable changes to this project will be documented in this file.
[#1888]: https://www.free-decompiler.com/flash/issues/1888
[#1890]: https://www.free-decompiler.com/flash/issues/1890
[#1810]: https://www.free-decompiler.com/flash/issues/1810
[#1891]: https://www.free-decompiler.com/flash/issues/1891
[#1882]: https://www.free-decompiler.com/flash/issues/1882
[#1880]: https://www.free-decompiler.com/flash/issues/1880
[#1881]: https://www.free-decompiler.com/flash/issues/1881

View File

@@ -2048,6 +2048,11 @@ public class AVM2Code implements Cloneable {
sp.setDeclaration(d);
declaredPropsDec.add(d);
declaredProperties.add(propName.resolvedMultinameName);
Slot sl = new Slot(new NewActivationAVM2Item(null, null), abc.constants.getMultiname(tsc.name_index));
declaredSlotsDec.add(d);
declaredSlots.add(sl);
if (subItem == currentItem) {
items.set(i, d);
} else {
@@ -2081,6 +2086,9 @@ public class AVM2Code implements Cloneable {
ssti.setDeclaration(d);
declaredSlotsDec.add(d);
declaredSlots.add(sl);
declaredPropsDec.add(d);
declaredProperties.add(slotPropertyName);
if (subItem == currentItem) {
items.set(i, d);