-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Consider the following Whiley function:
function f(int[] xs) -> (int[] rs):
xs[0] = 0
return xs
This currently compiles to the following Java:
public static BigInteger[] f(BigInteger[] xs) {
xs[BigInteger.valueOf(0L).intValue()] = BigInteger.valueOf(0L);
return xs;
}
The basic issue is that from the array access we want to propagate forwards the fact that it is expecting a Java int. This could then be used when translating the constant to produce this:
xs[0] = ...
There are presumably other situations when this might be useful ...
Metadata
Metadata
Assignees
Labels
No labels