Hi All,

In my generic code I now get this error, which requires manually finding all -a[] array ops, but that is another matter.

$/src/druntime/import/core/internal/arrayop.d-mixin-57(57,20): Deprecation: integral promotion not done for -_param_1[pos], use '-transition=intpromote' switch or -cast(int)(_param_1[pos])

Is there a way to avoid this in generic code so I can still take advantage of array ops? E.g.

this.vec[] = -this.vec[];

Or do I have to do some wrangling like this?

this.vec = this.vec.map!(a => -cast(int)(a)).array.to!(T[]) ??


What would be a good idiomatic way to fix this deprecation issue? I do not want to use the flag but make my code better, not mask the issue.

Thanks,
Norm



Reply via email to