Fixed AS3 - XML - get descendants operator parenthesis

This commit is contained in:
Jindra Petřík
2022-11-27 17:10:37 +01:00
parent 6f7a89b78f
commit 3537befde6
2 changed files with 10 additions and 2 deletions

View File

@@ -19,7 +19,8 @@ All notable changes to this project will be documented in this file.
- [#1892] AS3 - Package internal custom namespaces
- Unpin all context menu not clearing pins properly
- AS3 - RegExp escaping
- Avoid Error Implicit coercion of a value of type XXX to an unrelated type YYY
- AS3 - Avoid Error Implicit coercion of a value of type XXX to an unrelated type YYY
- AS3 - XML - get descendants operator parenthesis
## [17.0.2] - 2022-11-22
### Fixed

View File

@@ -65,7 +65,14 @@ public class GetDescendantsAVM2Item extends AVM2Item {
@Override
public GraphTextWriter appendTo(GraphTextWriter writer, LocalData localData) throws InterruptedException {
object.toString(writer, localData);
if (object.getPrecedence() > precedence) {
writer.append("(");
object.toString(writer, localData);
writer.append(")");
} else {
object.toString(writer, localData);
}
writer.append("..");
return multiname.toString(writer, localData);
}