Fixed AS2 - class detection of top level classes

This commit is contained in:
Jindra Petřík
2021-11-26 19:33:50 +01:00
parent 348102cdc7
commit 1d150c0442
2 changed files with 5 additions and 0 deletions

View File

@@ -445,6 +445,10 @@ public class ActionScript2ClassDetector {
if (memPath == null) {
throw new AssertException("Invalid pathsource");
}
//remove _global if it's there - happens for classes in global package
if (memPath.size() > 0 && "_global".equals(memPath.get(0))) {
memPath.remove(0);
}
if (!classNamePath.equals(memPath)) {
throw new AssertException("Invalid path of setmember:" + String.join(".", memPath));
}