New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ADVANCED mode java.lang.IllegalStateException #3944
Comments
FYI I used https://github.com/wala/jsdelta to find a reduced version of my crash. It was very fast and simplified it from 500k to only a few lines. |
Can you provide the exact command you've been using and potentially the reduced input that @ribrdb mentioned? |
This code in
Both OBJECTLIT and CLASS_MEMBERS generally expect to have multiple children |
I encountered the same error and managed to reduce it to this: class Data {
dt;
constructor(data) {
this.dt = data;
}
value() {
return this.dt;
}
}
let j = new Data(3);
console.log(j.value()); The culprit seems to be the uninitialized instance field declaration and the fact that it's accessed inside the If I remove the field or initialize it to |
Ah, this is an issue with public field handling. Thanks for the report. |
yes, the problem is the uninitialized instance field declaration |
This enables compilation with google's closure compiler by working around google/closure-compiler#3944. Adds example for using closure compiler.
This enables compilation with google's closure compiler by working around google/closure-compiler#3944. Adds example for using closure compiler.
Version: v20220502
I use closure-compiler in ADVANCED mode and get java.lang.IllegalStateException
0 error(s), 223 warning(s), 60.6% typed java.lang.IllegalStateException at com.google.common.base.Preconditions.checkState(Preconditions.java:486) at com.google.javascript.rhino.Node.getOnlyChild(Node.java:563) at com.google.javascript.jscomp.NodeUtil.getRValueOfLValue(NodeUtil.java:5190) at com.google.javascript.jscomp.PureFunctionIdentifier.populateFunctionDefinitions(PureFunctionIdentifier.java:423) at java.util.Map.forEach(Map.java:661) at com.google.javascript.jscomp.PureFunctionIdentifier.populateDatastructuresForAnalysisTraversal(PureFunctionIdentifier.java:399) at com.google.javascript.jscomp.PureFunctionIdentifier.process(PureFunctionIdentifier.java:157) at com.google.javascript.jscomp.OptimizeCalls.process(OptimizeCalls.java:124) at com.google.javascript.jscomp.PureFunctionIdentifier$Driver.process(PureFunctionIdentifier.java:1364) at com.google.javascript.jscomp.PhaseOptimizer$NamedPass.process(PhaseOptimizer.java:267) at com.google.javascript.jscomp.PhaseOptimizer.process(PhaseOptimizer.java:186) at com.google.javascript.jscomp.Compiler.performTranspilationAndOptimizations(Compiler.java:2572) at com.google.javascript.jscomp.Compiler.lambda$stage2Passes$5(Compiler.java:936) at com.google.javascript.jscomp.CompilerExecutor.lambda$runInCompilerThread$0(CompilerExecutor.java:101) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.lang.Thread.run(Thread.java:829) at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:597) at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:194)
Have no idea how to debug this problem and is there any problems in my code (12000 lines of code)
I will be grateful for your help
The text was updated successfully, but these errors were encountered: