mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
JS: fix error in strict mode when NPE is never instantiated directly
This commit is contained in:
parent
6bfbd38e22
commit
2bfc5b5305
|
@ -290,6 +290,11 @@ public class JavaScriptTarget implements TeaVMTarget, TeaVMJavaScriptHost {
|
|||
exceptionCons.getVariable(0).propagate(dependencyAnalyzer.getType(
|
||||
ArrayIndexOutOfBoundsException.class.getName()));
|
||||
exceptionCons.use();
|
||||
|
||||
exceptionCons = dependencyAnalyzer.linkMethod(new MethodReference(
|
||||
NullPointerException.class, "<init>", void.class));
|
||||
exceptionCons.getVariable(0).propagate(dependencyAnalyzer.getType(NullPointerException.class.getName()));
|
||||
exceptionCons.use();
|
||||
}
|
||||
|
||||
if (stackTraceIncluded) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user