mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
This commit is contained in:
parent
69857af688
commit
d929181e81
|
@ -19,6 +19,7 @@ import org.teavm.dependency.PluggableDependency;
|
|||
import org.teavm.diagnostics.Diagnostics;
|
||||
import org.teavm.javascript.spi.Async;
|
||||
import org.teavm.javascript.spi.GeneratedBy;
|
||||
import org.teavm.javascript.spi.Sync;
|
||||
import org.teavm.model.*;
|
||||
import org.teavm.platform.async.AsyncCallback;
|
||||
|
||||
|
@ -55,6 +56,11 @@ public class AsyncMethodProcessor implements ClassHolderTransformer {
|
|||
annot.getValues().put("value", new AnnotationValue(ValueType.parse(AsyncMethodGenerator.class)));
|
||||
method.getAnnotations().add(annot);
|
||||
}
|
||||
} else if (method.getName().equals("<clinit>")) {
|
||||
if (method.getAnnotations().get(Sync.class.getName()) == null) {
|
||||
AnnotationHolder annot = new AnnotationHolder(Sync.class.getName());
|
||||
method.getAnnotations().add(annot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user