¿Alguna forma de hacer un cálculo en tiempo de compilación usando racional_const y un valor constante?

De las siguientes tres declaraciones

ufixed constant TEST1 = 256;
uint constant TEST2 = 256;
uint[] testTable1 = [uint(0.001 * TEST1), uint(0.01 * TEST1), uint(1.1 * TEST1)];
uint[] testTable2 = [uint(0.001 * TEST2), uint(0.01 * TEST2), uint(1.1 * TEST2)];
uint[] testTable3 = [uint(0.001 * 256), uint(0.01 * 256), uint(1.1 * 256)];

solo funciona testTable3.

testTable1 da el error

UnimplementedFeatureError: Not yet implemented - FixedPointType.

y testTable2 da un error para cada elemento de tipo

 TypeError: Operator * not compatible with types rational_const 1 / 1000 and uint256

¿Hay alguna manera de definir una matriz de este tipo sin tener que especificar el factor de multiplicación en cada elemento?

solidez ^0.4.24;

Respuestas (1)

AFAIK, UnimplementedFeatureError: Not yet implemented - FixedPointType.solo soporte por solidity 0.5.0