[BUG] Destroy Private Fields
See original GitHub issueExpected Behavior
You could use private fields after obfuscation without errors
Current Behavior
You can’t use private fields after obfuscation, but you could did it without (obfuscate).
Steps to Reproduce
- Use private fields
Lose the keysGet error.
Your Environment
- Obfuscator version used: 3.4.4
- Node version used: 16.17.1
Stack trace
Minimal working example that will help to reproduce issue
class Kruzya {
#keys; // private, you can't steal my keys!
#count;
constructor(name, count = 0) {
this.#keys = [];
this.name = name;
this.#count = count;
}
stealKeys() {
for (const iterator of new Array(this.#count).fill(0)) {
this.#keys.push(iterator);
}
}
getInfo() {
console.log("%s, steal [%s] of your keys!", this.name, this.#keys.length);
}
}
const kruzya = new Kruzya("Kruzya", ~~(Math.random() * 500));
kruzya.stealKeys();
kruzya.getInfo()
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
How can I stop warnings about unused private fields?
Per this answer, try. QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-private-field. It appears that the QMAKE_CXXFLAGS_WARN_ON flags are added to the compiler ...
Read more >C++ static code analysis: Unused "private" fields should be ...
If a private field is declared but not used in the program, it can be considered dead code and should therefore be removed....
Read more >10 most deadly bugs that destroy crop production
Bollworm Thrips Pod sucking bugs Rootborer Weevil Mealybugs Berry Borer Fruit & shoot borer Aphids
Read more >How to Repair and Restore Grass Destroyed by Insects
Spread new seed in the areas affected by the insect damage. You will want to remove the damaged turf areas and loosen the...
Read more >Insects and their Injury to Plants - CT.gov
However, insects seldom destroy these plants. The threat of damage by insects need not prevent an attempt to grow any of these plants....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Such statements might be added to any places outside of a class
Yep, fixed
#1053 trouble isn’t fixed yet :c