kotlinx-benchmark icon indicating copy to clipboard operation
kotlinx-benchmark copied to clipboard

Error: Incompatible Type: There may be a loss in converting from double to long

Open li-fcb1899 opened this issue 1 year ago • 1 comments
trafficstars

BenchmarkTaskResult results = new BenchmarkTaskResult(res.allOps, res.measuredOps); image

In the generated Java code

RawResults res = new RawResults();
/*...*/
 BenchmarkTaskResult results = new BenchmarkTaskResult(res.allOps, res.measuredOps);

but

public class RawResults {

    public double allOps;
    public double measuredOps;
    /*...*/
}
public BenchmarkTaskResult(long allOperations, long measuredOperations)

Why treat double as long?

li-fcb1899 avatar Sep 21 '24 15:09 li-fcb1899

Hey @li-fcb1899! Could you please share some details on how to reproduce the issue?

fzhinkin avatar Sep 21 '24 17:09 fzhinkin