Call <clinit> from native System.currentTimeMillis

This commit is contained in:
Alexey Andreev 2017-11-13 00:37:20 +03:00
parent 945a0fee9d
commit 99812d1bfa

View File

@ -84,6 +84,7 @@ public class SystemNativeGenerator implements Generator, DependencyPlugin {
}
private void generateCurrentTimeMillis(SourceWriter writer) throws IOException {
writer.append(writer.getNaming().getNameFor("java.lang.System")).append("_$callClinit();").softNewLine();
writer.append("return Long_fromNumber(new Date().getTime());").softNewLine();
}