[Issue 16018] fold size_t[] with int seed causes forward reference error
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 6 19:05:46 UTC 2019
https://issues.dlang.org/show_bug.cgi?id=16018
berni44 <bugzilla at d-ecke.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |bugzilla at d-ecke.de
Resolution|--- |INVALID
--- Comment #1 from berni44 <bugzilla at d-ecke.de> ---
Meanwhile the example produces a static assert error:
Error: static assert: "Incompatible function/seed/element:
binaryFun/int/ulong"
The type of the seed defines the type of the result, here: int, but the
elements of the range are of type size_t, which is ulong on 64bit computers. As
int * ulong results in a ulong, which cannot implicitly be casted to int, this
results in an error.
The example works, when 1 is replaced by 1L or size_t.init
--
More information about the Digitalmars-d-bugs
mailing list