Prevent from generating functions with NaN identifier

This commit is contained in:
Alexey Andreev 2018-09-04 17:28:10 +03:00
parent b74c501fa6
commit 0473020bc8

View File

@ -49,7 +49,11 @@ public class MinifyingAliasProvider implements AliasProvider {
@Override
public String getStaticMethodAlias(MethodReference method) {
return RenderingUtil.indexToId(lastSuffix++, startLetters);
String result;
do {
result = RenderingUtil.indexToId(lastSuffix++, startLetters);
} while (!usedAliases.add(result) || RenderingUtil.KEYWORDS.contains(result));
return result;
}
@Override