@abaplint/core 2.102.12 → 2.102.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/src/registry.js
CHANGED
|
@@ -26,6 +26,7 @@ const objects_1 = require("../objects");
|
|
|
26
26
|
const _builtin_1 = require("../abap/5_syntax/_builtin");
|
|
27
27
|
const _scope_type_1 = require("../abap/5_syntax/_scope_type");
|
|
28
28
|
const statements_1 = require("../abap/2_statements/statements");
|
|
29
|
+
const crypto = require("crypto");
|
|
29
30
|
// todo: refactor each sub-rule to new classes?
|
|
30
31
|
// todo: add configuration
|
|
31
32
|
class DownportConf extends _basic_rule_config_1.BasicRuleConfig {
|
|
@@ -2544,8 +2545,14 @@ ${indentation} output = ${uniqueName}.\n`;
|
|
|
2544
2545
|
this.counter++;
|
|
2545
2546
|
return name;
|
|
2546
2547
|
}
|
|
2548
|
+
let postfix = "";
|
|
2549
|
+
if (spag.getIdentifier().stype === _scope_type_1.ScopeType.ClassDefinition) {
|
|
2550
|
+
// try making sure this name is not used in subclasses
|
|
2551
|
+
const hash = crypto.createHash("sha1").update(spag.getIdentifier().sname).digest("hex");
|
|
2552
|
+
postfix = "_" + hash.substring(0, 10);
|
|
2553
|
+
}
|
|
2547
2554
|
while (true) {
|
|
2548
|
-
const name = "temp" + this.counter;
|
|
2555
|
+
const name = "temp" + this.counter + postfix;
|
|
2549
2556
|
const exists = this.existsRecursive(spag, name);
|
|
2550
2557
|
this.counter++;
|
|
2551
2558
|
if (exists === false) {
|